Part Number Hot Search : 
1H222 ST72321 20180M90 620DW N3906 KBPC1 AD843JN NTE934
Product Description
Full Text Search
 

To Download M32176F2VFP Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  renesas 32-bit risc single-chip microcomputer m32r family / m32r/ecu series 32176 group 32 rev. 1.01 revision date: oct 31, 2003 user?s manual www.renesas.com before using this material, please visit our website to confirm that this is the most current document available. rej09b0067-0101z
keep safety first in your circuit designs! notes regarding these materials  renesas technology corporation puts the maximum effort into making semiconductor prod- ucts better and more reliable, but there is always the possibility that trouble may occur with them. trouble with semiconductors may lead to personal injury, fire or property damage. remember to give due consideration to safety when making your circuit designs, with ap- propriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of non- flammable material or (iii) prevention against any malfunction or mishap.  these materials are intended as a reference to assist our customers in the selection of the renesas technology corporation product best suited to the customer's application; they do not convey any license under any intellectual property rights, or any other rights, belonging to renesas technology corporation or a third party.  renesas technology corporation assumes no responsibility for any damage, or infringe- ment of any third-party's rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or circuit application examples contained in these materials.  all information contained in these materials, including product data, diagrams, charts, pro- grams and algorithms represents information on products at the time of publication of these materials, and are subject to change by renesas technology corporation without notice due to product improvements or other reasons. it is therefore recommended that custom- ers contact renesas technology corporation or an authorized renesas technology cor- poration product distributor for the latest product information before purchasing a product listed herein. the information described here may contain technical inaccuracies or typographical errors. renesas technology corporation assumes no responsibility for any damage, liability, or other loss rising from these inaccuracies or errors. please also pay attention to information published by renesas technology corporation by various means, including the renesas technology corporation semiconductor home page (http://www.renesas.com).  when using any or all of the information contained in these materials, including product data, diagrams, charts, programs, and algorithms, please be sure to evaluate all informa- tion as a total system before making a final decision on the applicability of the information and products. renesas technology corporation assumes no responsibility for any dam- age, liability or other loss resulting from the information contained herein.  renesas technology corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is poten- tially at stake. please contact renesas technology corporation or an authorized renesas technology corporation product distributor when considering the use of a product con- tained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use.  the prior written approval of renesas technology corporation is necessary to reprint or reproduce in whole or in part these materials.  if these products or technologies are subject to the japanese export control restrictions, they must be exported under a license from the japanese government and cannot be im- ported into a country other than the approved destination. any diversion or reexport contrary to the export control laws and regulations of japan and/ or the country of destination is prohibited.  please contact renesas technology corporation for further details on these materials or the products contained therein.
revision history rev. date description page summary (1/1) 32176 group user?s manual 1.01 oct 31, 2003 first edition issued ?
 guide to understanding the register table (1) bit number: indicates a register?s bit number. (2) register border: the registers enclosed with thick border lines must be accessed in halfwords or words. (3) status after reset: the initial state of each register after reset is indicated in hexadecimal or binary. (4) status after reset: the initial state of each register after reset is indicated bitwise. 0: this bit is ?0? after reset. 1: this bit is ?1? after reset. ?: this bit is undefined after reset. (5) the shaded bits mean that they have no functions assigned. (6) read conditions: r: this bit can be accessed for read. ?: the value read from this bit is undefined. (reading this bit has no effect.) 0: the value read from this bit is always ?0?. 1: the value read from this bit is always ?1?. (7) write conditions: w: this bit can be accessed for write. n: this bit is write protected. 0: to write to this bit, always write ?0?. 1: to write to this bit, always write ?1?. ?: writing to this bit has no effect. (it does not matter whether this bit is set to ?0? or ?1? by writing in software.) note: care must be taken when writing to this bit. see note in each register table. xxxregister(xxx) b01234567891011121314b15 aaa bbb ccc 000 0 0 0 0 0 0 0 0 0 0 0 0 0 b bit name function r w 0 aaa 0 :          bit r w          bit 1 :          bit 1 bbb 0 :          bit r w          bit 1 :          bit 2 ccc 0 :          bit r (note 1)          bit 1 :          bit 3?15 no function assigned. fix to ?0?. 0 0 note 1: only writing ?0? is effective. writing ?1? has no effect, in which case the bit retains the value it had before the wri te.  notation of active-low pins (signals) the symbol ?#? suffixed to the pin (or signal) names means that the pins (or signals) are active-low. before use (2) (4) (6) (7) (3) (1) (5)
(1) table of contents chapter 1 overview 1.1 outline of the 32176 group ---------------------------------------------------------------------------------------------- 1- 2 1.1.1 m32r family cpu core -------------------------------------------------------------------------------------- 1-2 1.1.2 built-in multiplier/accumulator ------------------------------------------------------------------------------- 1-2 1.1.3 built-in flash memory and ram ---------------------------------------------------------------------------- 1-3 1.1.4 built-in clock frequency multiplier ------------------------------------------------------------------------- 1-3 1.1.5 powerful built-in peripheral functions --------------------------------------------------------------------- 1-4 1.1.6 product list of the 32176 group ---------------------------------------------------------------------------- 1-4 1.2 block diagram ------------------------------------------------------------------------------------------------------------- - 1-5 1.3 pin functions ------------------------------------------------------------------------------------------------------------- -- 1-8 1.4 pin assignments ----------------------------------------------------------------------------------------------------------- 1-13 chapter 2 cpu 2.1 cpu registers ------------------------------------------------------------------------------------------------------------- 2-2 2.2 general-purpose registers --------------------------------------------------------------------------------------------- 2-2 2.3 control registers --------------------------------------------------------------------------------------------------------- - 2-3 2.3.1 processor status word register: psw (cr0) ---------------------------------------------------------- 2-4 2.3.2 condition bit register: cbr (cr1) ------------------------------------------------------------------------- 2-5 2.3.3 interrupt stack pointer: spi (cr2) and user stack pointer: spu (cr3) ------------------------- 2-5 2.3.4 backup pc: bpc (cr6) -------------------------------------------------------------------------------------- 2-5 2.4 accumulator --------------------------------------------------------------------------------------------------------------- - 2-6 2.5 program counter ---------------------------------------------------------------------------------------------------------- 2 -6 2.6 data formats -------------------------------------------------------------------------------------------------------------- - 2-7 2.6.1 data types ------------------------------------------------------------------------------------------------------- 2-7 2.6.2 data formats ---------------------------------------------------------------------------------------------------- 2-8 2.7 supplementary explanation for lock and unlock instruction execution --------------------------------- 2-14 chapter 3 address space 3.1 outline of the address space ------------------------------------------------------------------------------------------ 3-2 3.2 operation modes ---------------------------------------------------------------------------------------------------------- 3 -6 3.3 internal rom and external extension areas ------------------------------------------------------------------------ 3-8 3.3.1 internal rom area --------------------------------------------------------------------------------------------- 3-8 3.3.2 external extension area -------------------------------------------------------------------------------------- 3-8 3.4 internal ram and sfr areas ------------------------------------------------------------------------------------------ 3-9 3.4.1 internal ram area --------------------------------------------------------------------------------------------- 3-9 3.4.2 sfr (special function register) area -------------------------------------------------------------------- 3-9 3.5 eit vector entry ---------------------------------------------------------------------------------------------------------- - 3-33 3.6 icu vector table ---------------------------------------------------------------------------------------------------------- 3-34 3.7 notes about address space -------------------------------------------------------------------------------------------- 3-36 chapter 4 eit 4.1 outline of eit ------------------------------------------------------------------------------------------------------------ --- 4-2 4.2 eit events ---------------------------------------------------------------------------------------------------------------- -- 4-3
(2) 4.2.1 exception --------------------------------------------------------------------------------------------------------- 4-3 4.2.2 interrupt ----------------------------------------------------------------------------------------------------------- 4-3 4.2.3 trap ---------------------------------------------------------------------------------------------------------------- 4-3 4.3 eit processing procedure ---------------------------------------------------------------------------------------------- 4-4 4.4 eit processing mechanism --------------------------------------------------------------------------------------------- 4-6 4.5 acceptance of eit events ----------------------------------------------------------------------------------------------- 4-7 4.6 saving and restoring the pc and psw ----------------------------------------------------------------------------- 4-7 4.7 eit vector entry ---------------------------------------------------------------------------------------------------------- - 4-9 4.8 exception processing ---------------------------------------------------------------------------------------------------- 4- 10 4.8.1 reserved instruction exception (rie) --------------------------------------------------------------------- 4-10 4.8.2 address exception (ae) -------------------------------------------------------------------------------------- 4-12 4.9 interrupt processing ------------------------------------------------------------------------------------------------------ 4-14 4.9.1 reset interrupt (ri) -------------------------------------------------------------------------------------------- 4-14 4.9.2 system break interrupt (sbi) -------------------------------------------------------------------------------- 4-15 4.9.3 external interrupt (ei) ----------------------------------------------------------------------------------------- 4-17 4.10 trap pr ocessing ---------------------------------------------------------------------------------------------------------- 4-19 4.10.1 trap ---------------------------------------------------------------------------------------------------------------- 4-19 4.11 eit priority levels ------------------------------------------------------------------------------------------------------ - 4-21 4.12 example of eit processing ------------------------------------------------------------------------------------------- 4-22 4.13 precautions on eit ------------------------------------------------------------------------------------------------------ 4 -24 chapter 5 interrupt controller (icu) 5.1 outline of the interrupt controller --------------------------------------------------------------------------------------- 5-2 5.2 icu related registers --------------------------------------------------------------------------------------------------- 5- 4 5.2.1 interrupt ve ctor registe r ------------------------------------------------------------------------------------- 5-5 5.2.2 interrupt request mask register --------------------------------------------------------------------------- 5-6 5.2.3 sbi (system break interrupt) control register --------------------------------------------------------- 5-7 5.2.4 interrupt control registers ----------------------------------------------------------------------------------- 5-8 5.3 interrupt request sources in internal peripheral i/o ------------------------------------------------------------- 5-11 5.4 icu ve ctor table ---------------------------------------------------------------------------------------------------------- 5-12 5.5 description of interrupt operation ------------------------------------------------------------------------------------- 5-1 3 5.5.1 acceptance of internal peripheral i/o interrupts ------------------------------------------------------- 5-13 5.5.2 processing by internal peripheral i/o interrupt handlers -------------------------------------------- 5-15 5.6 description of system break interrupt (sbi) o peration ---------------------------------------------------------- 5-18 5.6.1 acceptance of sbi --------------------------------------------------------------------------------------------- 5-18 5.6.2 sbi processing by handler ---------------------------------------------------------------------------------- 5-18 chapter 6 internal memory 6.1 outline of the internal memory ----------------------------------------------------------------------------------------- 6-2 6.2 internal ram -------------------------------------------------------------------------------------------------------------- -- 6-2 6.3 internal flash memory --------------------------------------------------------------------------------------------------- 6- 2 6.4 registers associated with the internal flash memory ----------------------------------------------------------- 6-6 6.4.1 flash mode register ------------------------------------------------------------------------------------------ 6-7 6.4.2 flash stat us register ------------------------------------------------------------------------------------------ 6-8 6.4.3 flash control registers --------------------------------------------------------------------------------------- 6-9 6.4.4 virtual flash l bank registers ------------------------------------------------------------------------------ 6-15 6.4.5 virtual flash s bank registers ------------------------------------------------------------------------------ 6-16 6.5 programming the internal flash memory ---------------------------------------------------------------------------- 6-17
(3) 6.5.1 outline of internal flash memory programming --------------------------------------------------------- 6-17 6.5.2 controlling operation modes during flash programming -------------------------------------------- 6-23 6.5.3 procedure for programming/erasing the internal flash memory ---------------------------------- 6-26 6.5.4 flash programming time (referenc e) -------------------------------------------------------------------- 6-34 6.6 virtual flash emulation function -------------------------------------------------------------------------------------- 6-36 6.6.1 virtual flash emulation area -------------------------------------------------------------------------------- 6-37 6.6.2 entering virtual flash emulation mode ------------------------------------------------------------------- 6-44 6.6.3 application example of virtual flash emulation mode ------------------------------------------------ 6-45 6.7 connecting to a serial programmer (csio mode) ----------------------------------------------------------------- 6-47 6.8 internal flash memory protect function ----------------------------------------------------------------------------- 6-49 6.9 precautions to be taken when rewriting the internal flash memory -------------------------------------- 6-50 chapter 7 reset 7.1 outline of reset ---------------------------------------------------------------------------------------------------------- -- 7-2 7.2 reset operation ----------------------------------------------------------------------------------------------------------- 7-2 7.2.1 reset at power-on --------------------------------------------------------------------------------------------- 7-3 7.2.2 reset during operation ---------------------------------------------------------------------------------------- 7-3 7.2.3 reset vector relocation during flash programming --------------------------------------------------- 7-3 7.3 internal state immediately after exiting reset ---------------------------------------------------------------------- 7-4 7.4 things to be considered after exiting reset ------------------------------------------------------------------------ 7-4 chapter 8 input/output ports and pin functions 8.1 outline of input/output ports ------------------------------------------------------------------------------------------- 8- 2 8.2 selecting pin functions -------------------------------------------------------------------------------------------------- 8 -3 8.3 input/output port related registers ---------------------------------------------------------------------------------- 8-5 8.3.1 port data registers -------------------------------------------------------------------------------------------- 8-7 8.3.2 port direction registers -------------------------------------------------------------------------------------- 8-8 8.3.3 port operation mode registers ----------------------------------------------------------------------------- 8-9 8.3.4 port peripheral function select register ----------------------------------------------------------------- 8-14 8.3.5 port input special function control register ------------------------------------------------------------ 8-15 8.4 port input level switching function ---------------------------------------------------------------------------------- 8-18 8.5 port peripheral circuits -------------------------------------------------------------------------------------------------- 8-20 8.6 precautions on input/output ports ------------------------------------------------------------------------------------ 8-25 chapter 9 dmac 9.1 outline of the dmac ------------------------------------------------------------------------------------------------------ 9 -2 9.2 dmac related registers ------------------------------------------------------------------------------------------------ 9-4 9.2.1 dma channel control registers --------------------------------------------------------------------------- 9-6 9.2.2 dma software request generation registers ---------------------------------------------------------- 9-12 9.2.3 dma source address registers ---------------------------------------------------------------------------- 9-13 9.2.4 dma destination address registers ---------------------------------------------------------------------- 9-14 9.2.5 dma transfer count registers ----------------------------------------------------------------------------- 9-15 9.2.6 dma interrupt related registers --------------------------------------------------------------------------- 9-16 9.3 functional description of the dmac ---------------------------------------------------------------------------------- 9-22 9.3.1 dma transfer request sources --------------------------------------------------------------------------- 9-22 9.3.2 dma transfer processing procedure --------------------------------------------------------------------- 9-25 9.3.3 starting dma ---------------------------------------------------------------------------------------------------- 9-26
(4) 9.3.4 dma channel priority ------------------------------------------------------------------------------------------ 9-26 9.3.5 gaining and releasing control of the internal bus ------------------------------------------------------ 9-26 9.3.6 transfer units --------------------------------------------------------------------------------------------------- 9-27 9.3.7 transfer counts ------------------------------------------------------------------------------------------------ 9-27 9.3.8 address space -------------------------------------------------------------------------------------------------- 9-27 9.3.9 transfer operation --------------------------------------------------------------------------------------------- 9-27 9.3.10 end of dma and interrupt ------------------------------------------------------------------------------------ 9-30 9.3.11 each register status after completion of dma transfer -------------------------------------------- 9-30 9.4 precautions about the dmac ------------------------------------------------------------------------------------------ 9-31 chapter 10 multijunction timers 10.1 outline of multijunction timers ---------------------------------------------------------------------------------------- 10 -2 10.2 common units of multijunction timers ----------------------------------------------------------------------------- 10-7 10.2.1 mjt common unit register map ------------------------------------------------------------------------- 10-8 10.2.2 prescaler unit -------------------------------------------------------------------------------------------------- 10-9 10.2.3 clock bus and input/output event bus control unit ------------------------------------------------- 10-10 10.2.4 input processing control unit ------------------------------------------------------------------------------ 10-14 10.2.5 output flip-flop control unit -------------------------------------------------------------------------------- 10-20 10.2.6 interrupt control unit ----------------------------------------------------------------------------------------- 10-25 10.3 top (output-related 16-bit timer) --------------------------------------------------------------------------------- 10-42 10.3.1 outline of top -------------------------------------------------------------------------------------------------- 10-42 10.3.2 outline of each mode of top ------------------------------------------------------------------------------- 10-44 10.3.3 top related register map ---------------------------------------------------------------------------------- 10-46 10.3.4 top control r egisters ---------------------------------------------------------------------------------------- 10-48 10.3.5 top counters (top0ct?top10ct) --------------------------------------------------------------------- 10-53 10.3.6 top reload registers (top0rl?top10rl) ---------------------------------------------------------- 10-54 10.3.7 top correction registers (top0cc?top10cc) ----------------------------------------------------- 10-55 10.3.8 top enable control registers ------------------------------------------------------------------------------ 10-56 10.3.9 operation in top single-shot output mode (with correction function) -------------------------- 10-58 10.3.10 operation in top delayed single-shot output mode (with correction function) -------------- 10-64 10.3.11 operation in top continuous output mode (without correction function) --------------------- 10-69 10.4 tio (input/output-related 16-bit timer) --------------------------------------------------------------------------- 10-72 10.4.1 outline of tio --------------------------------------------------------------------------------------------------- 10-72 10.4.2 outline of each mode of tio -------------------------------------------------------------------------------- 10-74 10.4.3 tio related register map ----------------------------------------------------------------------------------- 10-77 10.4.4 tio control registers ----------------------------------------------------------------------------------------- 10-79 10.4.5 tio counters ( tio0ct?tio9ct) -------------------------------------------------------------------------- 10-87 10.4.6 tio reload 0/ measure registers (tio0rl0?tio9rl0) -------------------------------------------- 10-88 10.4.7 tio reload 1 registers (tio0rl1?tio9rl1) ---------------------------------------------------------- 10-89 10.4.8 tio enable control registers ------------------------------------------------------------------------------- 10-90 10.4.9 operation in tio measure free-run/clear input modes ----------------------------------------------- 10-92 10.4.10 operation in tio noise processing input mode -------------------------------------------------------- 10-94 10.4.11 operation in tio pwm output mode --------------------------------------------------------------------- 10-95 10.4.12 operation in tio single-shot output mode (without correction function) ----------------------- 10-98 10.4.13 operation in tio delayed single-shot output mode (without correction function) ----------- 10-100 10.4.14 operation in tio continuous output mode (without correction function) ----------------------- 10-102 10.5 tms (input-related 16-bit timer) ----------------------------------------------------------------------------------- 10-104 10.5.1 outline of tms -------------------------------------------------------------------------------------------------- 10-104
(5) 10.5.2 outline of tms operation ------------------------------------------------------------------------------------- 10-104 10.5.3 tms related register map ----------------------------------------------------------------------------------- 10-106 10.5.4 tms control registers ---------------------------------------------------------------------------------------- 10-107 10.5.5 tms counters (tms0ct, tms1ct) ---------------------------------------------------------------------- 10-108 10.5.6 tms measure registers (tms0mr3?0, tms1mr3?0) ---------------------------------------------- 10-108 10.5.7 operation of tms measure input -------------------------------------------------------------------------- 10-109 10.6 tml (input-related 32-bit timer) ----------------------------------------------------------------------------------- 10-110 10.6.1 outline of tml -------------------------------------------------------------------------------------------------- 10-110 10.6.2 outline of tml operation ------------------------------------------------------------------------------------ 10-111 10.6.3 tml related register map ---------------------------------------------------------------------------------- 10-111 10.6.4 tml control registers ---------------------------------------------------------------------------------------- 10-112 10.6.5 tml counters --------------------------------------------------------------------------------------------------- 10-113 10.6.6 tml measure registers -------------------------------------------------------------------------------------- 10-114 10.6.7 operation of tml measure input --------------------------------------------------------------------------- 10-116 chapter 11 a-d converter 11.1 outline of a-d converter ----------------------------------------------------------------------------------------------- 11 -2 11.1.1 conversion modes --------------------------------------------------------------------------------------------- 11-5 11.1.2 operation modes ----------------------------------------------------------------------------------------------- 11-5 11.1.3 special operation modes ------------------------------------------------------------------------------------ 11-8 11.1.4 a-d converter interrupt and dma transfer requests ------------------------------------------------ 11-11 11.1.5 sample-and-hold function ----------------------------------------------------------------------------------- 11-11 11.2 a-d converter related registers ------------------------------------------------------------------------------------ 11-12 11.2.1 a-d single mode register 0 --------------------------------------------------------------------------------- 11-14 11.2.2 a-d single mode register 1 --------------------------------------------------------------------------------- 11-16 11.2.3 a-d scan mode register 0 ---------------------------------------------------------------------------------- 11-18 11.2.4 a-d scan mode register 1 ---------------------------------------------------------------------------------- 11-20 11.2.5 a-d conversion speed control register ----------------------------------------------------------------- 11-22 11.2.6 a-d disconnection detection assist function control register ------------------------------------ 11-23 11.2.7 a-d disconnection detection assist method select register --------------------------------------- 11-24 11.2.8 a-d successive approximation register ----------------------------------------------------------------- 11-27 11.2.9 a-d comparate data register ------------------------------------------------------------------------------ 11-28 11.2.10 10-bit a-d data registers ------------------------------------------------------------------------------------ 11-29 11.2.11 8-bit a-d data registers -------------------------------------------------------------------------------------- 11-30 11.3 functional description of a-d converter --------------------------------------------------------------------------- 11-31 11.3.1 how to find analog input voltages ------------------------------------------------------------------------ 11-31 11.3.2 a-d conversion by successive approximation method ---------------------------------------------- 11-32 11.3.3 comparator operation ---------------------------------------------------------------------------------------- 11-33 11.3.4 calculating the a-d conversion time --------------------------------------------------------------------- 11-34 11.3.5 accuracy of a-d conversion -------------------------------------------------------------------------------- 11-37 11.4 inflow current bypass circuit ----------------------------------------------------------------------------------------- 11- 39 11.5 precautions on using a-d converter ------------------------------------------------------------------------------- 11-41 chapter 12 serial i/o 12.1 outline of serial i/o ---------------------------------------------------------------------------------------------------- - 12-2 12.2 serial i/o rela ted registers ------------------------------------------------------------------------------------------ 12- 5 12.2.1 sio interrupt related registers ---------------------------------------------------------------------------- 12-6 12.2.2 sio interrupt control registers ----------------------------------------------------------------------------- 12-9
(6) 12.2.3 sio transmit control registers ----------------------------------------------------------------------------- 12-13 12.2.4 sio transmit/receive mode registers -------------------------------------------------------------------- 12-15 12.2.5 sio transmit buffer registers ------------------------------------------------------------------------------ 12-18 12.2.6 sio receive buffer registers ------------------------------------------------------------------------------- 12-19 12.2.7 sio receive control registers ----------------------------------------------------------------------------- 12-20 12.2.8 sio baud rate registers ------------------------------------------------------------------------------------ 12-23 12.2.9 sio special mode registers -------------------------------------------------------------------------------- 12-24 12.3 transmit operation in csio mode ---------------------------------------------------------------------------------- 12-25 12.3.1 setting the csio baud rate --------------------------------------------------------------------------------- 12-25 12.3.2 initializing csio transmission ------------------------------------------------------------------------------ 12-26 12.3.3 starting csio transmission --------------------------------------------------------------------------------- 12-28 12.3.4 successive csio transmission ---------------------------------------------------------------------------- 12-28 12.3.5 processing at end of csio transmission --------------------------------------------------------------- 12-29 12.3.6 transmit interrupts --------------------------------------------------------------------------------------------- 12-29 12.3.7 transmit dma transfer request --------------------------------------------------------------------------- 12-29 12.3.8 example of csio transmit operation -------------------------------------------------------------------- 12-31 12.4 receive operation in csio mode ----------------------------------------------------------------------------------- 12-33 12.4.1 initialization for csio reception ---------------------------------------------------------------------------- 12-33 12.4.2 starting csio reception ------------------------------------------------------------------------------------- 12-35 12.4.3 processing at end of csio reception -------------------------------------------------------------------- 12-35 12.4.4 about successive reception -------------------------------------------------------------------------------- 12-36 12.4.5 flags showing the status of csio receive operation ----------------------------------------------- 12-37 12.4.6 example of csio receive operation --------------------------------------------------------------------- 12-38 12.5 precautions on using csio mode ----------------------------------------------------------------------------------- 12-40 12.6 transmit operation in uart mode --------------------------------------------------------------------------------- 12-41 12.6.1 setting the uart baud rate -------------------------------------------------------------------------------- 12-41 12.6.2 uart transmit/receive data formats ------------------------------------------------------------------- 12-41 12.6.3 initializing uart transmission ----------------------------------------------------------------------------- 12-43 12.6.4 starting uart transmission ------------------------------------------- ------------------------------------- 12-45 12.6.5 successive uart transmission --------------------------------------------------------------------------- 12-45 12.6.6 processing at end of uart transmission --------------------------------------------------------------- 12-45 12.6.7 transmit interrupts --------------------------------------------------------------------------------------------- 12-45 12.6.8 transmit dma transfer request --------------------------------------------------------------------------- 12-46 12.6.9 example of uart transmit operation ------------------------------------------------------------------- 12-47 12.7 receive operation in uart mode ---------------------------------------------------------------------------------- 12-49 12.7.1 initialization for uart reception --------------------------------------------------------------------------- 12-49 12.7.2 starting uart reception ------------------------------------------------------------------------------------ 12-51 12.7.3 processing at end of uart reception ------------------------------------------------------------------- 12-51 12.7.4 example of uart receive operation -------------------------------------------------------------------- 12-53 12.7.5 start bit detection during uart reception ------------------------------------------------------------- 12-55 12.8 fixed period clock output function -------------------------------------------------------------------------------- 12-56 12.9 precautions on using uart mode ---------------------------------------------------------------------------------- 12-57 chapter 13 can module 13.1 outline of the can module -------------------------------------------------------------------------------------------- 13-2 13.2 can module related registers -------------------------------------------------------------------------------------- 13-4 13.2.1 can control registers ---------------------------------------------------------------------------------------- 13-15 13.2.2 can status registers ----------------------------------------------------------------------------------------- 13-18
(7) 13.2.3 can fextended id registers ------------------------- ------------------------------------------------------- 13-21 13.2.4 can configuration registers -------------------------------------------------------------------------------- 13-22 13.2.5 can timestamp count registers -------------------------------------------------------------------------- 13-24 13.2.6 can error count registers ---------------------------------------------------------------------------------- 13-25 13.2.7 can baud rate prescalers ---------------------------------------------------------------------------------- 13-26 13.2.8 can interrupt related registers --------------------------------------------------------------------------- 13-27 13.2.9 can cause of error registers ------------------------------------------------------------------------------ 13-45 13.2.10 can mode registers ------------------------------------------------------------------------------------------ 13-47 13.2.11 can dm a transfer request select reg isters ----------------------------------------------------------- 13-48 13.2.12 can mask registers ------------------------------------------------------------------------------------------ 13-49 13.2.13 can single-shot mode control registers --------------------------------------------------------------- 13-53 13.2.14 can message slot control registers --------------------------------------------------------------------- 13-54 13.2.15 can message slots ------------------------------------------------------------------------------------------- 13-58 13.3 can protocol ------------------------------------------------------------------------------------------------------------- 13-73 13.3.1 can protocol frames ----------------------------------------------------------------------------------------- 13-73 13.3.2 data formats during can transmission/reception -------------------------------------------------- 13-74 13.3.3 can controller error states --------------------------------------------------------------------------------- 13-75 13.4 initializing the can module -------------------------------------------------------------------------------------------- 13 -76 13.4.1 initializing the can module ---------------------------------------------------------------------------------- 13-76 13.5 transmitting data frames --------------------------------------------------------------------------------------------- 13-7 9 13.5.1 data frame transmit procedure --------------------------------------------------------------------------- 13-79 13.5.2 data frame transmit operation ---------------------------------------------------------------------------- 13-80 13.5.3 transmit abort function -------------------------------------------------------------------------------------- 13-81 13.6 receiving data frames ------------------------------------------------------------------------------------------------ 13-8 2 13.6.1 data frame receive procedure ---------------------------------------------------------------------------- 13-82 13.6.2 data frame receive operation ----------------------------------------------------------------------------- 13-83 13.6.3 reading out received data frames ---------------------------------------------------------------------- 13-85 13.7 transmitting remote frames ---------------------------------------------------------------------------------------- 13-87 13.7.1 remote frame transmit procedure ----------------------------------------------------------------------- 13-87 13.7.2 remote frame transmit operation ----------------------------------------------------------------------- 13-88 13.7.3 reading out received data frames when set for remote frame transmission ------------ 13-90 13.8 receiving remote frames -------------------------------------------------------------------------------------------- 13-92 13.8.1 remote frame receive procedure ------------------------------------------------------------------------ 13-92 13.8.2 remote frame receive operation ------------------------------------------------------------------------ 13-93 13.9 precautions about can module -------------------------------------------------------------------------------------- 13-96 chapter 14 real time debugger (rtd) 14.1 outline of the real-time debugger (rtd) ------------------------------------------------------------------------ 14-2 14.2 pin functions of rtd ---------------------------------------------------------------------------------------------------- 1 4-3 14.3 rtd related register -------------------------------------------------------------------------------------------------- 14- 3 14.3.1 rtd write function disable register --------------------------------------------------------------------- 14-3 14.4 functional description of rtd ----------------------------------------------------------------------------------------- 14- 4 14.4.1 outline of rtd op eration ------------------------------------------------------------------------------------ 14-4 14.4.2 operation of rdr (real-time ram content output) ------------------------------------------------- 14-4 14.4.3 operation of wrr (ram content forcible rewrite) --------------------------------------------------- 14-6 14.4.4 operation of ver (continuous monitor) ----------------------------------------------------------------- 14-7 14.4.5 operation of vei (interrupt request) --------------------------------------------------------------------- 14-7 14.4.6 operation of rcv (recover from runaway) -------------------------------------------------------------- 14-8
(8) 14.4.7 method for setting a specified address when using rtd ------------------------------------------- 14-9 14.4.8 resetting rtd -------------------------------------------------------------------------------------------------- 14-10 14.5 typical connection with the host ------------------------------------------------------------------------------------ 14-11 chapter 15 external bus interface 15.1 external bus interface related signals ----------------------------------------------------------------------------- 15-2 15.2 external bus interface related registers ------------------------------------------------------------------------- 15-4 15.2.1 port operation mode register ------------------------------------------------------------------------------ 15-4 15.2.2 bus mode control register ---------------------------------------------------------------------------------- 15-5 15.3 read/write operations ------------------------------------------------------------------------------------------------- 15- 6 15.4 bus arbitration ---------------------------------------------------------------------------------------------------------- -- 15-12 15.5 typical connection of external extension memory ------------------------------------------------------------- 15-14 chapter 16 wait controller 16.1 outline of the wait controller ----------------------------------------------------------------------------------------- 16 -2 16.2 wait controller related register ------------------------------------------------------------------------------------- 16-4 16.2.1 wait cycles control register -------------------------------------------------------------------------------- 16-4 16.3 typical operation of the wait controller --------------------------------------------------------------------------- 16-5 chapter 17 ram backup mode 17.1 outline of ram backup mode ---------------------------------------------------------------------------------------- 17-2 17.2 example of ram backup when power is off -------------------------------------------------------------------------- 17-2 17.2.1 normal operating state --------------------------------------------------------------------------------------- 17-3 17.2.2 ram backup state --------------------------------------------------------------------------------------------- 17-4 17.3 example of ram backup for saving power consumption ---------------------------------------------------- 17-5 17.3.1 normal operating state --------------------------------------------------------------------------------------- 17-6 17.3.2 ram backup state --------------------------------------------------------------------------------------------- 17-7 17.3.3 precautions to be observed at power-on --------------------------------------------------------------- 17-8 17.4 exiting ram backup mode (wakeup) ------------------------------------------------------------------------------ 17-9 chapter 18 oscillator circuit 18.1 oscillator circuit ------------------------------------------------------------------------------------------------------- --- 18-2 18.1.1 example of an oscillator circuit ---------------------------------------------------------------------------- 18-2 18.1.2 xin oscillation stoppage detection function ------------------------------------------------------------ 18-3 18.1.3 oscillation drive capability select function ------------------------------------------------------------- 18-5 18.1.4 system clock output function ------------------------------------------------------------------------------ 18-7 18.1.5 oscillation stabilization time at power-on -------------------------------------------------------------- 18-7 18.2 clock generator circuit ------------------------------------------------------------------------------------------------ 18 -8 chapter 19 jtag 19.1 outlin e of jtag ---------------------------------------------------------------------------------------------------------- 19-2 19.2 configuration of jtag circuit ------------------------------------------------------------------------------------------ 19 -3 19.3 jtag registers ---------------------------------------------------------------------------------------------------------- 1 9-4 19.3.1 instruction register (jtagir) ------------------------------------------------------------------------------- 19-4 19.3.2 data register ---------------------------------------------------------------------------------------------------- 19-5 19.4 basic operation of jtag ---------------------------------------------------------------------------------------------- 19-6 19.4.1 outline of jtag operation ----------------------------------------------------------------------------------- 19-6
(9) 19.4.2 ir path sequence ---------------------------------------------------------------------------------------------- 19-8 19.4.3 dr path sequence -------------------------------------------------------------------------------------------- 19-9 19.4.4 inspecting and setting data registers -------------------------------------------------------------------- 19-10 19.5 boundary scan description language ----------------------------------------------------------------------------- 19-11 19.6 notes on board design when connecting jtag ---------------------------------------------------------------------- 19-12 19.7 processing pins when not using jtag ---------------------------------------------------------------------------- 19-13 chapter 20 power supply circuit 20.1 configuration of the power supply circuit -------------------------------------------------------------------------- 20-2 20.2 power-on sequence ---------------------------------------------------------------------------------------------------- 20-3 20.2.1 power-on sequence when not using ram backup -------------------------------------------------- 20-3 20.2.2 power-on sequence when using ram backup-------------------------------------------------------- 20-4 20.3 power-off sequence ---------------------------------------------------------------------------------------------------- 20- 5 20.3.1 power-off sequence when not using ram backup -------------------------------------------------- 20-5 20.3.2 power-off sequence when using ram backup ------------------------------------------------------- 20-6 chapter 21 electrical characteristics 21.1 absolute maximum ratings ------------------------------------------------------------------------------------------- 21-2 21.2 electrical characteristics when vcce = 5 v, f(xin) = 10 mhz ---------------------------------------------- 21-3 21.2.1 recommended operating conditions (when vcce = 5 v, f(xin) = 10 mhz) ------------------- 21-3 21.2.2 d.c. characteristics (when vcce = 5 v, f(xin) = 10 mhz) ----------------------------------------- 21-5 21.2.3 a-d conversion characteristics (when vcce = 5 v, f(xin) = 10 mhz) -------------------------- 21-6 21.3 electrical characteristics when vcce = 5 v, f(xin) = 8 mhz ------------------------------------------------ 21-7 21.3.1 recommended operating conditions (when vcce = 5 v, f(xin) = 8 mhz) -------------------- 21-7 21.3.2 d.c. characteristics (when vcce = 5 v, f(xin) = 8 mhz) ------------------------------------------- 21-9 21.3.3 a-d conversion characteristics (when vcce = 5 v, f(xin) = 8 mhz) ---------------------------- 21-10 21.4 electrical characteristics when vcce = 3.3 v, f(xin) = 10 mhz -------------------------------------------- 21-11 21.4.1 recommended operating conditions (when vcce = 3.3 v 0.3 v, f(xin) = 10 mhz) ------ 21-11 21.4.2 d.c. characteristics (when vcce = 3.3 v 0.3 v, f(xin) = 10 mhz) ---------------------------- 21-13 21.4.3 a-d conversion characteristics (when vcce = 3.3 v 0.3 v, f(xin) = 10 mhz) ------------- 21-14 21.5 electrical characteristics when vcce = 3.3 v, f(xin) = 8 mhz ---------------------------------------------- 21-15 21.5.1 recommended operating conditions (when vcce = 3.3 v 0.3 v f(xin) = 8 mhz) -------- 21-15 21.5.2 d.c. characteristics (when vcce = 3.3 v 0.3 v, f(xin) = 8 mhz) ------------------------------ 21-17 21.5.3 a-d conversion characteristics (when vcce = 3.3 v 0.3 v, f(xin) = 8 mhz) --------------- 21-18 21.6 flash memory related characteristics ----------------------------------------------------------------------------- 21-19 21.7 external capacitance for power supply ---------------------------------------------------------------------------- 21-20 21.8 a.c. characteristics (when vcce = 5 v) -------------------------------------------------------------------------- 21-20 21.8.1 timing requirements ----------------------------------------------------------------------------------------- 21-20 21.8.2 switching characteristics ------------------------------------------------------------------------------------- 21-24 21.8.3 a.c. characteristics -------------------------------------------------------------------------------------------- 21-27 21.9 a.c. characteristics (when vcce = 3.3 v) ----------------------------------------------------------------------- 21-36 21.9.1 timing requirements ----------------------------------------------------------------------------------------- 21-36 21.9.2 switching characteristics ------------------------------------------------------------------------------------- 21-40 21.9.3 a.c. characteristics -------------------------------------------------------------------------------------------- 21-43 chapter 22 typical characteristics to be written at a later time -------------------------------------------------------------------------------------------------- - 22-2
(10) appendix 1 mechanical specificaitons appendix 1.1 dimensional outline drawing -------------------------------------------------------------------- appendix 1-2 appendix 2 instruction processing time appendix 2.1 m32r/ecu instruction processing time ------------------------------------------------------ appendix 2-2 appendix 3 processing of unused pins appendix 3.1 example processing of unused pins --------------------------------------------------------- appendix 3-2 appendix 4 summary of precautions appendix 4.1 precautions about the cpu --------------------------------------------------------------------- appendix 4-2 appendix 4.2 precautions about the address space ------------------------------------------------------- appendix 4-3 appendix 4.3 precautions about eit --------------------------------------------------------------------------- appendix 4- 3 appendix 4.4 precautions to be observed when programming internal flash memory --------- appendix 4-3 appendix 4.5 precautions to be observed after exiting reset ------------------------------------------- appendix 4-4 appendix 4.6 precautions about input/output ports -------------------------------------------------------- appendix 4-4 appendix 4.7 precautions about the dmac ------------------------------------------------------------------ appendix 4-5 appendix 4.8 precautions about the multijunction timers ------------------------------------------------ appendix 4-6 appendix 4.8.1 precautions on using top single-shot output mode ---------------------------- appendix 4-6 appendix 4.8.2 precautions on using top delayed single-shot output mode ----------------- appendix 4-8 appendix 4.8.3 precautions on using top continuous output mode ----------------------------- appendix 4-9 appendix 4.8.4 precautions on using tio measure free-run/clear input modes ------------- appendix 4-9 appendix 4.8.5 precautions on using tio pwm outp ut mode -------------------------------------- appendix 4-9 appendix 4.8.6 precautions on using tio single-shot output mode ------------------------------ appendix 4-9 appendix 4.8.7 precautions on using tio delayed single-shot output mode ------------------ appendix 4-10 appendix 4.8.8 precautions on using tio continuous output mode ------------------------------ appendix 4-10 appendix 4.8.9 precautions on using tms measure input ------------------------------------------- appendix 4-10 appendix 4.8.10 precautions on using tml measure input ------------------------------------------ appendix 4-11 appendix 4.9 precautions about the a-d converters ------------------------------------------------------ appendix 4-12 appendix 4.10 precautions about serial i/o ------------------------------------------------------------------- appendix 4-15 appendix 4.10.1 precautions on using csio mode ----------------------------------------------------- appendix 4-15 appendix 4.10.2 precautions on using uart mode ---------------------------------------------------- appendix 4-16 appendix 4.11 precautions about can module --------------------------------------------------------------- appendix 4-17 appendix 4.12 precautions about ram backup mode ------------------------------------------------------ appendix 4-18 appendix 4.13 precautions about jtag ------------------------------------------------------------------------ appendix 4-19 appendix 4.13.1 notes on board design when connecting jtag ----------------------------------- appendix 4-19 appendix 4.13.2 processing pins when not using jtag ---------------------------------------------- appendix 4-20 appendix 4.14 precautions about noise ------------------------------------------------------------------------ appendix 4-21 appendix 4.14.1 reduction of wiring length ------------------------------------------------------------- appendix 4-21 appendix 4.14.2 inserting a bypass capacitor between vss and vcc lines ------------------- appendix 4-23 appendix 4.14.3 processing analog input pin wiring -------------------------------------------------- appendix 4-23 appendix 4.14.4 consideration about the oscillator ----------------------------------------------------- appendix 4-24 appendix 4.14.5 processing input/output ports --------------------------------------------------------- appendix 4-28
chapter 1 overview 1.1 outline of the 32176 group 1.2 block diagram 1.3 pin functions 1.4 pin assignments
1-2 1 overview 32176 group user?s manual (rev.1.01) 1.1 outline of the 32176 group 1.1.1 m32r family cpu core (1) based on a risc architecture ? the 32176 is a 32-bit risc single-chip microcomputer which is built around the m32r family cpu core (hereinafter referred to as the m32r) and incorporates flash memory, ram and various other peripheral functions-all integrated into a single chip. ? the m32r is based on a risc architecture. memory is accessed using load/store instructions, and various arithmetic operations are executed using register-to-register operation instructions. the m32r internally contains sixteen 32-bit general-purpose registers and has 83 instructions. ? the m32r supports compound instructions such as load & address update and store & address update, in addition to ordinary load and store instructions. these instructions help to speed up data transfers. (2) five-stage pipelined processing ? the m32r supports five-stage pipelined instruction processing consisting of instruction fetch, de- code, execute, memory access and write back. not just load/store instructions and register-to-reg- ister operation instructions, compound instructions such as load & address update and store & address update are executed in one cpuclk period (which is equivalent to 25 ns when f(cpuclk) = 40 mhz). ? although instructions are supplied to the execution stage in the order in which they were fetched, it is possible that if the load/store instruction supplied first is extended by wait cycles inserted in memory access, the subsequent register-to-register operation instruction will be executed before that instruc- tion. using such a facility, which is known as the ?out-of-order-completion? mechanism, the m32r is able to control instruction execution without wasting clock cycles. (3) compact instruction code ? the m32r supports two instruction formats: one 16 bits long, and one 32 bits long. use of the 16-bit instruction format especially helps to suppress the code size of a program. ? moreover, the availability of 32-bit instructions makes programming easier and provides higher per- formance at the same clock speed than in architectures where the address space is segmented. for example, some 32-bit instructions allow control to jump to an address 32 mbytes forward or backward from the currently executed address in one instruction, making programming easy. 1.1.2 built-in multiplier/accumulator (1) built-in high-speed multiplier ? the m32r contains a 32 bits 16 bits high-speed multiplier which enables the m32r to execute a 32 bits 32 bits integral multiplication instruction in three cpuclk periods. (2) dsp-comparable multiply-accumulate instructions ? the m32r supports the following four types of multiply-accumulate instructions (or multiplication instruc- tions) which each can be executed in one cpuclk period using a 56-bit accumulator. (1) 16 high-order bits of register 16 high-order bits of register (2) 16 low-order bits of register 16 low-order bits of register (3) whole 32 bits of register 16 high-order bits of register (4) whole 32 bits of register 16 low-order bits of register ? the m32r has some special instructions to round the value stored in the accumulator to 16 or 32 bits or shift the accumulator value before storing in a register to have its digits adjusted. because these instructions are also executed in one cpuclk period, when used in combination with high-speed data transfer instructions such as load & address update or store & address update, they enable the m32r to exhibit data processing capability comparable to that of a dsp. 1.1 outline of the 32176 group
1 1-3 overview 32176 group user?s manual (rev.1.01) 1.1 outline of the 32176 group 1.1.3 built-in flash memory and ram ? the 32176 contains a ram that can be accessed with zero wait state, allowing to design a high-speed embedded system. ? the internal flash memory can be written to while mounted on a printed circuit board (on-board writ- ing). use of flash memory facilitates development work, because the chip used at the development stage can be used directly in mass-production, allowing for a smooth transition from prototype to mass-production without the need to change the printed circuit board. ? the internal flash memory has a virtual flash emulation function, allowing the internal ram to be virtually mapped into part of the internal flash memory. when combined with the internal real-time debugger (rtd), this function makes the rom table data tuning easy. ? the internal ram can be accessed for reading or rewriting data from an external device indepen- dently of the m32r by using the real-time debugger. the external device is communicated using the real-time debugger?s exclusive clock-synchronized serial i/o. 1.1.4 built-in clock frequency multiplier ? the 32176 contains a clock frequency multiplier, which is schematically shown in figure 1.1.1 below. xin pin (8mhz-10mhz) bclk (peripheral clock) (16mhz-20mhz) cpuclk (cpu clock) (32mhz-40mhz) x4 1/2 pll figure 1.1.1 conceptual diagram of the clock frequency multiplier table 1.1.1 clock functional block features cpuclk ? cpu clock: defined as f(cpuclk) when it indicates the operating clock frequency for the m32r core, internal flash memory and internal ram. bclk ? peripheral clock: defined as f(bclk) when it indicates the operating clock frequency for the internal peripheral i/o and external data bus. clock output (bclk pin output) ? a clock with the same frequency as f(bclk) is output from this pin.
1-4 1 overview 32176 group user?s manual (rev.1.01) 1.1 outline of the 32176 group 1.1.5 powerful built-in peripheral functions (1) multijunction timer (mjt) (2) 10-channel dmac (3) 16-channel a-d converter (adc) (4) 4-channel high-speed serial i/o (sio) (5) real-time debugger (rtd) (6) 8-level interrupt controller (icu) (7) three operation modes (8) wait controller (9) 2-channel full-can (10) m32r family?s common debug function (scalable debug interface or sdi) 1.1.6 product list of the 32176 group table 1.1.2 product list type name rom size ram size package type cpuclk bclk operating ambient (max frequency) (max frequency) temperature M32176F2VFP 256 kbytes 24 kbytes 144-pin lqfp 32 mhz 16 mhz ?40c to 125c m32176f3vfp 384 kbytes 24 kbytes 144-pin lqfp 32 mhz 16 mhz ?40c to 125c m32176f4vfp 512 kbytes 24 kbytes 144-pin lqfp 32 mhz 16 mhz ?40c to 125c m32176f2tfp 256 kbytes 24 kbytes 144-pin lqfp 40 mhz 20 mhz ?40c to 85c m32176f3tfp 384 kbytes 24 kbytes 144-pin lqfp 40 mhz 20 mhz ?40c to 85c m32176f4tfp 512 kbytes 24 kbytes 144-pin lqfp 40 mhz 20 mhz ?40c to 85c
1 1-5 overview 32176 group user?s manual (rev.1.01) 1.2 block diagram 1.2 block diagram figure 1.2.1 shows a block diagram of the 32176. the features of each block are described in table 1.2.1. figure 1.2.1 block diagram of the 32176 pll clock generator internal bus interface address data internal ram (24 kbytes) internal flash memory (m32176f4: 512 kbytes) (m32176f3: 384 kbytes) (m32176f2: 256 kbytes) m32r core multiplier/accumulator (32 bits 16 bits + 56 bits) dmac (10 channels) multijunction timer (37 channels) serial i/o (4 channels) a-d converter (10-bit converter, 16 channels) wait controller interrupt controller (23 sources, 8 levels) real-time debugger (rtd) external bus interface internal 32-bit bus 96 input/output ports full can (2 channels) internal 16-bit bus internal power supply generator (vdc)
1-6 1 overview 32176 group user?s manual (rev.1.01) 1.2 block diagram table 1.2.1 features of the 32176 (1/2) functional block features m32r cpu core ? implementation: five-stage pipelined instruction processing ? internal 32-bit structure of the core ? register configuration general-purpose registers: 32 bits 16 registers control registers: 32 bits 5 registers ? instruction set 16 and 32-bit instruction formats 83 instructions and six addressing modes ? internal multiplier/accumulator (32 bits 16 bits + 56 bits) ram ? capacity: 24 kbytes ? zero-wait access ? the internal ram can be accessed for reading or rewriting data from the outside independently of the m32r by using the real-time debugger, without ever causing the cpu performance to decrease. flash memory ? capacity: m32176f2: 256 kbytes, m32176f3: 384 kbytes, m32176f4: 512 kbytes ? zero-wait access ? durability: standard product : 100 times 10000 (10k) times rewritable : 4-kbyte block (note 2) : 10,000 (10k) times -product (note 1) : other blocks : 1,000 (1k) times bus specification ? fundamental bus cycle : 25 ns (when f(cpuclk = 40 mhz) ? logical address space : 4 gbytes linear ? internal bus specification : internal 32-bit data bus (for cpu <-> internal flash memory and ram access) : internal 16-bit data bus (for internal peripheral i/o access) ? external area: maximum 2 mbytes (during processor mode) ? external extention area: maximum 2 mbytes ? external data address bus: 19-bit address ? external data bus: 16-bit data bus ? shortest external bus access: 2 bclk periods during read, 2 bclk periods during write dmac ? number of channels: 10 ? transfers between internal peripheral i/o?s or internal ram?s or between internal peripheral i/o and internal ram are supported. ? capable of advanced dma transfers when used in combination with internal peripheral i/o ? transfer request: software or internal peripheral i/o (a-d converter, mjt, serial i/o or can) ? dma channels can be cascaded. (dma transfer on a channel can be started by completion of a transfer on another channel.) ? interrupt request: dma transfer counter register underflow multijunction timer (mjt) ? 37-channel multi-functional timer 16-bit output related timer 11 channels, 16-bit input/output related timer 10 channels, 16-bit input related timer 8 channels, 32-bit input related timer 8 channels ? flexible timer configuration is possible by interconnecting these timer channels. ? interrupt request: counter underflow or overflow and rising or falling or both edges or high or low level from the tin pin (these can be used as external interrupt inputs irrespective of timer operation.) ? dma transfer request: counter underflow or overflow and rising or falling or both edges or high or low level from the tin pin (these can be used as external dma transfer request inputs irrespective of timer operation.) note 1: the 10000 (10k) times rewritable product is offered as an optional item. for details about it, please contact your nearest office of renesas or its distributor. note 2: block 1: h?0000 2000 to h?0000 2ffff block 2: h?0000 3000 to h?0000 3ffff
1 1-7 overview 32176 group user?s manual (rev.1.01) table 1.2.1 features of the 32176 (2/2) 1.2 block diagram functional block features a-d converter (adc) ? 16 channels: 10-bit resolution a-d converter ? conversion modes: ordinary conversion modes plus comparator mode ? operation modes: single conversion mode and n-channel scan mode (n = 1?16) ? sample-and-hold function: sample-and-hold function can be enabled or disabled as necessary. ? a-d disconnection detection assist function: influences of the analog input voltage leakage from any preceding channel during scan mode operation are suppressed. ? an inflow current bypass circuit is built-in. ? can generate an interrupt or start dma transfer upon completion of a-d conversion. ? either 8 or 10-bit conversion results can be read out. ? interrupt request: completion of a-d conversion ? dma transfer request: completion of a-d conversion serial i/o (sio) ? 4-channel serial i/o ? can be chosen to be clock-synchronized serial i/o or uart. ? data can be transferred at high speed (2 mbits per second during clock-synchronized mode or 156 kbits per second during uart mode when f(bclk) = 20 mhz). ? interrupt request: reception completed, receive error, transmit buffer empty or transmission completed ? dma transfer request: reception completed or transmit buffer empty can ? 16 message slots 2 blocks ? compliant with can specification 2.0b active. ? interrupt request: transmission completed, reception completed, bus error, error-passive, bus-off or single shot ? dma transfer request: transmission failed, transmission completed or reception completed real-time debugger ? internal ram can be rewritten or monitored independently of the cpu by entering a command (rtd) from the outside. ? comes with exclusive clock-synchronized serial ports. ? interrupt request: rtd interrupt command input interrupt controller (icu) ? controls interrupt requests from the internal peripheral i/o. ? supports 8-level interrupt priority including an interrupt disabled state. ? external interrupt: 11 sources (sbi#, tin0,tin3, tin16-tin23) ? tin pin input sensing: rising, falling or both edges or high or low level wait controller ? controls wait states for access to the external extention area. ? insertion of 1-4 wait states by setting up in software + wait state extension by entering wait# signal pll ? a multiply-by-4 clock generating circuit clock ? maximum external input clock frequency (xin) is 10.0 mhz. (note 1) ? cpuclk: operating clock for the m32r-cpu core, internal flash memory and internal ram the maximum cpu clock is 40 mhz (when f(xin) = 10 mhz). ? bclk: operating clock for the internal peripheral i/o and external data bus the maximum peripheral clock is 20 mhz (peripheral module access when f(xin) = 10 mhz). ? clock output (bclk pin output): a clock with the same frequency as bclk is output from this pin. jtag ? boundary scan function vdc ? internal power supply generating circuit: generates the internal power supply (2.5 v) from an external single power supply (5 or 3.3 v). ports ? input/output pins: 96 pins ? the port input threshold can be set in a program to one of three levels individually for each port group (with or without schmitt circuit, selectable). note 1: maximum external input clock frequency (xin) for the M32176F2VFP, m32176f3vfp and m32176f4vfp is 8.0 mhz.
1-8 1 overview 32176 group user?s manual (rev.1.01) 1.3 pin functions figure 1.3.1 pin function diagram 1.3 pin functions figure 1.3.1 shows the 32176?s pin function diagram. pin functions are described in table 1.3.1. xin reset# 32176 group excvdd vss p20/a23-p27/a30 p30/a15-p37/a22 p46/a13, p47/a14 p225/a12 address bus 19 p00/db0-p07/db7 p10/db8-p17/db15 data bus 16 p72/hreq# p73/hack# bus control p71/wait# p43/rd# p44/cs0# p45/cs1# p41/blw#/ble# p42/bhw#/bhe# port 2 port 3 port 4 port 22 port 0 port 1 port 7 port 4 xout excosc-vcc osc-vss mod0 mod2 (note 1) mod1 p150/tin0, p153/tin3 p130/tin16-p137/tin23 10 port 15 port 13 p124/tclk0-p127/tclk3 4 multi- junction timer 21 p93/to16-p97/to20 p100/to8-p107/to15 p110/to0-p117/to7 port 12 port 11 port 10 port 9 p74/rtdtxd/txd3 p75/rtdrxd/rxd3 p76/rtdack/ctx1 p77/rtdclk/crx1 real time debugger port 7 p70/bclk/wr# port 7 p82/txd0 p83/rxd0 p84/sclki 0/sclko 0 p85/txd1 p86/rxd1 p87/sclki 1/sclko 1 serial i/o can1 serial i/o port 8 avcc0 p61-p63 port 6 vref0 vdde n.c. (note 2) fp excvcc vcce p174/txd2 p175/rxd2 port 17 16 ad0in0-ad0in15 p220/ctx0 p221/crx0 can0 jtms jtck jtrst jtdo jtag jtdi port 22 sbi# avss0 3 4 2 5 clock reset mode a-d converter interrupt controller note 1: mod2 must be connected to the ground. note 2: n.c. indicates non-connected pin. connect the pin to the power supply, ground, or the like that has no voltage change. note:  the pin (signal) with "#" at the end of the pin name (signal name) indicates it is a low active pin (signal).
1 1-9 overview 32176 group user?s manual (rev.1.01) 1.3 pin functions table 1.3.1 description of pin functions (1/4) type pin name signal name input/output description power supply vcce main power supply ? power supply for the device (5.0 v 0.5 v or 3.3 v 0.3 v). excvcc internal power supply ? this pin connects an external capacitor. vdde ram power supply ? backup power supply for the internal ram (5.0 v 0.5 v or 3.3 v 0.3 v). excvdd internal power ? this pin connects an external capacitor for the internal power supply of ram supply of the internal ram. vss ground ? connect all vss pins to ground (gnd). clock xin, clock input input these are clock input/output pins. a pll-based 4 frequency xout clock output output multiplier is included, which accepts as input a clock whose frequency is 1/4 of the internal cpu clock frequency. (xin input is 10 mhz when f(cpuclk) = 40 mhz.) bclk system clock output this pin outputs a clock whose frequency is twice that of the external input clock (xin). (bclk output is 20 mhz when f(cpuclk) = 40 mhz.) use this clock to synchronize the operation of external devices. excosc clock power supply ? this pin connects an external capacitor for the oscillator circuit. -vcc osc-vss clock ground ? connect osc-vss to ground. reset reset# reset input reset input pin for the internal circuit. mode mod0- mode input set the microcomputer?s operation mode. mod2 mod0 mod1 mod2 mode l l l single-chip mode l h l external extension mode h l l processor mode h h l (settings inhibited) (note 1) x x h (settings inhibited) x: don?t care flash fp flash protect input this special pin protects the flash memory against rewrites in hardware. address bus a12?a30 address bus output to allow two areas of up to 1 mb memory space to be connected external to the chip, the device has 19 address lines (a12?a30). a31 is not output. note 1: boot mode requires that the fp pin should be at the high level. for details about boot mode, see chapter 6, ?internal memory.?
1-10 1 overview 32176 group user?s manual (rev.1.01) 1.3 pin functions table 1.3.1 description of pin functions (2/4) type pin name signal name input/output description data bus db0?db15 data bus input/output this 16-bit data bus is used to connect external devices. when writing in byte units during a write cycle, the output data at the invalid byte position is undefined. during a read cycle, data on the entire 16-bit bus is always read in. however, only the data at the valid byte position is transferred into the internal circuit. bus control cs0#,cs1# chip select output these are chip select signals for external devices. rd# read output this signal is output when reading an external device. wr# write output this signal is output when writing to an external device. bhw#,blw# byte high write/ output when writing to an external device, this signal indicates the byte low write valid byte position to which data is transferred. bhw# and blw# correspond to the upper address side (bits 0?7 are valid) and the lower address side (bits 8?15 are valid), respectively. bhe# byte high enable output during an external device access, this signal indicates that the high-order data (bits 0?7) is valid. ble# byte low enable output during an external device access, this signal indicates that the low-order data (bits 8?15) is valid. wait# wait input when accessing an external device, a low-level input on wait# pin extends the wait cycle. hreq# hold request input this input is used by an external device to request control of the external bus. a low-level input on hreq# pin places the cpu in a hold state. hack# hold acknowledge output this signal notifies that the cpu has entered a hold state and relinquished control of the external bus. multijunction tin0, tin3, timer input input input pins for the multijunction timer. timer tin16?tin23 to0?to20 timer output output output pins for the multijunction timer. tclk0 timer clock input clock input pins for the multijunction timer. ?tclk3 a-d converter avcc0 analog power supply ? avcc0 is the power supply for the a-d0 c onverter. connect avcc0 to the power supply rail. avss0 analog ground ? avss0 is the analog ground for the a-d0 converter. connect avss0 to ground. ad0in0 analog input input 16-channel analog input pins for the a-d0 converter. ?ad0in15 vref0 reference voltage input vref0 is the reference voltage input pin for the a-d0 input converter. interrupt sbi# system break input this is the system break interrupt (sbi) input pin for the controller interrupt interrupt controller.
1 1-11 overview 32176 group user?s manual (rev.1.01) 1.3 pin functions table 1.3.1 description of pin functions (3/4) type pin name signal name input/output description serial i/o sclki0/ uart transmit/receive input/output when channel 0 is in uart mode: sclko0 clock output or csio this pin outputs a clock derived from brg output by transmit/receive clock dividing it by 2. input/output when channel 0 is in csio mode: this pin accepts as input a transmit/receive clock when external clock is selected or outputs a transmit/receive clock when internal clock is selected. sclki1/ uart transmit/receive input/output when channel 1 is in uart mode: sclko1 clock output or csio this pin outputs a clock derived from brg output by transmit/receive clock dividing it by 2. input/output when channel 1 is in csio mode: this pin accepts as input a transmit/receive clock when external clock is selected or outputs a transmit/receive clock when internal clock is selected. txd0 transmit data output transmit data output pin for serial i/o channel 0. rxd0 received data input received data input pin for serial i/o channel 0. txd1 transmit data output transmit data output pin for serial i/o channel 1. rxd1 received data input received data input pin for serial i/o channel 1. txd2 transmit data output transmit data output pin for serial i/o channel 2. rxd2 received data input received data input pin for serial i/o channel 2. txd3 transmit data output transmit data output pin for serial i/o channel 3. rxd3 received data input received data input pin for serial i/o channel 3. real-time rtdtxd transmit data output serial data output pin for the real-time debugger. debugger rtdrxd received data input serial data input pin for the real-time debugger. (rtd) rtdclk clock input input serial data transmit/receive clock input pin for the real-time debugger. rtdack acknowledge output a low-level pulse is output from this pin synchronously with the start clock for the real-time debugger?s serial data output word. the low-level pulse width indicates the type of command/ data received by the real-time debugger. can ctx0, ctx1 data output output this pin outputs data from the can module. crx0, crx1 data input input this pin accepts as input the data for the can module. jtag jtms test mode input test mode select input to control the state transition of the test circuit. jtck clock input clock input for the debug module and test circuit. jtrst test reset input test reset input to initialize the test circuit asynchronously with device operation. jtdi serial input input this pin accepts as input the test instruction code or test data that is serially received. jtdo serial output output this pin outputs the test instruction code or test data serially.
1-12 1 overview 32176 group user?s manual (rev.1.01) 1.3 pin functions table 1.3.1 description of pin functions (4/4) type pin name signal name input/output description input/output p00?p07 input/output port 0 input/output programmable input/output port. ports p10?p17 input/output port 1 (note 1) p20?p27 input/output port 2 p30?p37 input/output port 3 p41?p47 input/output port 4 p61?p63 input/output port 6 p70?p77 input/output port 7 p82?p87 input/output port 8 p93?p97 input/output port 9 p100?p107 input/output port 10 p110?p117 input/output port 11 p124?p127 input/output port 12 p130?p137 input/output port 13 p150, p153 input/output port 15 p174, p175 input/output port 17 p220, p225, input/output port 22 p221(note 1) note 1: ? input/output port 5 is reserved for future use. also, input/output ports 14, 16 and 18-21 are nonexistent. note 2: ? p221 is input-only port.
1 1-13 overview 32176 group user?s manual (rev.1.01) 1.4 pin assignments 1.4 pin assignments figure 1.4.1 shows the 32176?s pin assignment diagram. a pin assignment table is shown in table 1.4.1. figure 1.4.1 pin assignment diagram (top view) 44 43 37 38 39 40 41 42 60 59 51 52 53 54 55 56 45 46 47 48 49 50 57 58 63 64 66 67 68 69 70 71 72 65 61 62 89 90 99 98 97 96 95 94 93 92 91 103 102 101 108 10 7 10 6 105 104 73 74 84 75 76 77 78 79 80 81 82 83 85 86 87 88 100 2 4 3 5 6 7 8 9 35 22 23 24 25 26 27 28 29 30 31 32 33 34 11 12 13 14 15 16 17 18 19 20 21 10 1 36 p43/rd# vss excvcc p41/blw#/ble# p153/tin3 p150/tin0 vcce p107/to15 p106/to14 p104/to12 p103/to11 mod2 (note1) p125/tclk1 p124/tclk0 n.c. (note 2) excosc-vcc xout xi n os c-vs s p3 7/a2 2 p3 6/a2 1 p3 3/a1 8 p3 1/a1 6 p3 0/a1 5 p3 5/a2 0 p3 4/ a19 p3 2/a1 7 p27/a3 0 p25/ a28 p2 6/a29 p24/a2 7 p11/ db9 p07/ db7 p0 5/db5 p02/db 2 p0 1/db 1 p00/ db0 p2 3/a26 p2 2/a2 5 p2 0/a2 3 p10/db 8 p06/db6 p0 4/db4 p03/ db3 p21/ a2 4 p44/cs0# p45/cs1# p47/a14 p46/a13 p221/crx0 p14/db12 p15/db13 p16/db14 p17/db15 p82/txd0 p83/rxd0 p174/txd2 p175/rxd2 vss excvcc vref0 avcc0 ad0in7 ad0in6 ad0in5 ad0in4 ad0in3 ad0in2 ad0in1 ad0in0 ad0in15 ad0in14 ad0in13 ad0in12 ad0in11 ad0in10 ad0in9 ad0in8 avss0 p85/txd1 p86/rxd1 rese t# p87/sclki1/sclko1 vss p6 2 fp p9 4/to17 p74/rtdtxd/ txd3 p75/rtdrxd/ rxd3 p76/rtdack/c tx1 p77/rtdclk/c rx1 p61 p6 3 p1 14/ to4 p 115/ to5 p1 16/ to6 p1 17/to7 vc ce mod 1 p1 12/ to2 p1 13 /to3 p7 0/bclk / w r # p71/ wait# p72/ hre q# sbi# mod 0 p93/ to16 p7 3/ hac k# vdde excvdd vs s p127/tclk3 p100/ to8 p1 01/to9 p1 02/ to10 p137/tin23 p136/tin22 p135/tin21 p134/tin20 p105/to13 p1 10 /to0 p1 11/ to1 p97/ to20 p96/to 19 p9 5/to18 p133/tin19 p132/tin18 p131/tin17 p130/tin16 p126/tclk2 jtdi jtdo jtrst jtck jtms p1 2/db 10 p84/sclki0/sclko0 vcce vcce 112 119 116 115 113 111 110 109 120 117 114 124 132 130 129 127 121 137 144 143 142 141 140 139 138 133 136 135 134 123 122 131 128 125 126 118 p220/ctx0 p2 25 /a1 2 p13/db11 vss 32176 group p42/bhw#/bhe# package: 144p6q-a (0.5mm pitch) note 1: mod2 must be connected to the ground. note 2: n.c. indicates non-connected pin. connect the pin to the power supply, ground, or the like that has no voltage change. note:  the pin (signal) with "#" at the end of the pin name (signal name) indicates it is a low active pin (signal).
1-14 1 overview 32176 group user?s manual (rev.1.01) 1.4 pin assignments the pins directed for input go to a high-impedance state (hi-z) when reset. the term ?when reset? reffers to the period when input on reset# pin is held low (the device remains reset), as well as when the reset# pin is released back high (the device comes out of reset). table 1.4.1 pin assignments of the 32176 (1/4) port other than port other than port 1 p221/crx0 p221 crx0 - input 3 osc-vss - osc-vss -- 4xin - xin - input 5xout - xo u t - output 6excosc-vcc - excosc- v cc -- 7n.c. ---- function pin no. symbol type - input/output - input/output 2 p225/a12 8 p30/a15 p30 a15 p225 a12 9 p31/a16 p31 a16 - input/output 10 p32/a17 p32 a17 - input/output - input/output - input/output 11 p33/a18 12 p34/a19 p34 a19 p33 a18 13 p35/a20 p35 a20 - input/output 14 p36/a21 p36 a21 - input/output - input/output 15 p37/a22 p37 a22 pin state when reset function type state during reset state upon exiting reset p221 input hi-z hi-z during single-chip mode p225 input hi-z hi-z during external extension and processor modes a12 output hi-z undefined osc-vss --- xin input -- xout output xout xout excosc- v cc --- ---- during single-chip mode p30 input hi-z hi-z during external extension and processor modes a15 output hi-z undefined during single-chip mode p31 input hi-z hi-z during external extension and processor modes a16 output hi-z undefined during single-chip mode p32 input hi-z hi-z during external extension and processor modes a17 output hi-z undefined during single-chip mode p33 input hi-z hi-z during external extension and processor modes a18 output hi-z undefined during single-chip mode p34 input hi-z hi-z during external extension and processor modes a19 output hi-z undefined during single-chip mode p35 input hi-z hi-z during external extension and processor modes a20 output hi-z undefined during single-chip mode p36 input hi-z hi-z during external extension and processor modes a21 output hi-z undefined during single-chip mode p37 input hi-z hi-z during external extension and processor modes a22 output hi-z undefined condition 20 vcce - vcce -- 21 vss - vss -- - input/output 16 p20/a23 p20 a23 17 p21/a24 p21 a24 - input/output 18 p22/a25 p22 a25 - input/output - input/output - input/output 19 p23/a26 22 p24/a27 p24 a27 p23 a26 23 p25/a28 p25 a28 - input/output 24 p26/a29 p26 a29 - input/output - input/output - input/output 25 p27/a30 26 p00/db0 p00 db0 p27 a30 during single-chip mode p20 input hi-z hi-z during external extension and processor modes a23 output hi-z undefined during single-chip mode p21 input hi-z hi-z during external extension and processor modes a24 output hi-z undefined during single-chip mode p22 input hi-z hi-z during external extension and processor modes a25 output hi-z undefined during single-chip mode p23 input hi-z hi-z during external extension and processor modes a26 output hi-z undefined vcce --- vss --- during single-chip mode p24 input hi-z hi-z during external extension and processor modes a27 output hi-z undefined during single-chip mode p25 input hi-z hi-z during external extension and processor modes a28 output hi-z undefined during single-chip mode p26 input hi-z hi-z during external extension and processor modes a29 output hi-z undefined during single-chip mode p27 input hi-z hi-z during external extension and processor modes a30 output hi-z undefined during single-chip mode p00 input hi-z hi-z during external extension and processor modes db0 input/output hi-z hi-z
1 1-15 overview 32176 group user?s manual (rev.1.01) 1.4 pin assignments table 1.4.1 pin assignments of the 32176 (2/4) port other than port other than port - input/output function - input/output - input/output - input/output 30 p04/db4 p04 db4 29 p03/db3 p03 db3 27 p01/db1 p01 db1 28 p02/db2 pin no. - db11 - db9 input/output 37 p13/db11 p13 input/output 36 p12/db10 p12 db10 - input/output 35 p11/db9 p11 - input/output 33 p07/db7 34 p10/db8 p10 db8 p07 db7 - input/output - input/output - input/output 32 p06/db6 p06 db6 31 p05/db5 p05 db5 p02 db2 symbol type pin state when reset function type state during reset state upon exiting reset during single-chip mode p01 input hi-z hi-z during external extension and processor modes db1 input/output hi-z hi-z during single-chip mode p02 input hi-z hi-z during external extension and processor modes db2 input/output hi-z hi-z during single-chip mode p03 input hi-z hi-z during external extension and processor modes db3 input/output hi-z hi-z during single-chip mode p04 input hi-z hi-z during external extension and processor modes db4 input/output hi-z hi-z during single-chip mode p05 input hi-z hi-z during external extension and processor modes db5 input/output hi-z hi-z during single-chip mode p06 input hi-z hi-z during external extension and processor modes db6 input/output hi-z hi-z during single-chip mode p07 input hi-z hi-z during external extension and processor modes db7 input/output hi-z hi-z during single-chip mode p10 input hi-z hi-z during external extension and processor modes db8 input/output hi-z hi-z during single-chip mode p11 input hi-z hi-z during external extension and processor modes db9 input/output hi-z hi-z during single-chip mode p12 input hi-z hi-z during external extension and processor modes db10 input/output hi-z hi-z during single-chip mode p13 input hi-z hi-z during external extension and processor modes db11 input/output hi-z hi-z condition 42 vref0 - vref0 -- 43 avcc0 - avcc0 -- 44 ad0in0 - ad0in0 - input 45 ad0in1 - ad0in1 - input 46 ad0in2 - ad0in2 - input 47 ad0in3 - ad0in3 - input 48 ad0in4 - ad0in4 - input 49 ad0in5 - ad0in5 - input 50 ad0in6 - ad0in6 - input 51 ad0in7 - ad0in7 - input 52 ad0in8 - ad0in8 - input 53 ad0in9 - ad0in9 - input 54 ad0in10 - ad0in10 - input 55 ad0in11 - ad0in11 - input 56 ad0in12 - ad0in12 - input 57 ad0in13 - ad0in13 - input 58 ad0in14 - ad0in14 - input 59 ad0in15 - ad0in15 - input - - db13 input/output 41 p17/db15 p17 db15 input/output 40 p16/db14 p16 db14 - input/output 39 p15/db13 p15 38 p14/db12 p14 db12 - input/output during single-chip mode p14 input hi-z hi-z during external extension and processor modes db12 input/output hi-z hi-z during single-chip mode p15 input hi-z hi-z during external extension and processor modes db13 input/output hi-z hi-z during single-chip mode p16 input hi-z hi-z during external extension and processor modes db14 input/output hi-z hi-z during single-chip mode p17 input hi-z hi-z during external extension and processor modes db15 input/output hi-z hi-z vref0 --- avcc0 --- ad0in0 input hi-z hi-z ad0in1 input hi-z hi-z ad0in2 input hi-z hi-z ad0in3 input hi-z hi-z ad0in4 input hi-z hi-z ad0in5 input hi-z hi-z ad0in6 input hi-z hi-z ad0in7 input hi-z hi-z ad0in8 input hi-z hi-z ad0in9 input hi-z hi-z ad0in10 input hi-z hi-z ad0in11 input hi-z hi-z ad0in12 input hi-z hi-z ad0in13 input hi-z hi-z ad0in14 input hi-z hi-z ad0in15 input hi-z hi-z
1-16 1 overview 32176 group user?s manual (rev.1.01) 1.4 pin assignments table 1.4.1 pin assignments of the 32176 (3/4) port other than port other than port 60 avss0 - avss0 -- 61 excvcc - excvcc -- 62 vss - vss -- 63 p174/txd2 p174 txd2 - input/output 64 p175/rxd2 p175 rxd2 - input/output 65 vcce - vcce - input/output 66 p82/txd0 p82 txd0 - input/output 67 p83/rxd0 p83 rxd0 - input/output 68 p84/sclki0/sclko0 p84 sclki0 sclko0 input/output 69 p85/txd1 p85 txd1 - input/output 70 p86/rxd1 p86 rxd1 - input/output 71 p87/sclki1/sclko1 p87 sclki1 sclko1 input/output 72 vss - vss -- 73 excvdd - excvdd -- 74 p61 p61 -- input/output 75 p62 p62 -- input/output 76 p63 p63 -- input/output 77 sbi# sbi# - input 78 p70/bclk/wr# p70 bclk wr# input/output 79 p71/wait# p71 wait# - input/output 80 p72/hreq# p72 hreq# - input/output 81 p73/hack# p73 hack# - input/output 82 p74/rtdtxd/txd3 p74 rtdtxd txd3 input/output 83 p75/rtdrxd/rxd3 p75 rtdrxd rxd3 input/output 84 p76/rtdack/ctx1 p76 rtdack ctx1 input/output 85 p77/rtdclk/crx1 p77 rtdclk crx1 input/output 86 p93/to16 p93 to16 - input/output 87 p94/to17 p94 to17 - input/output pin no. symbol type function pin state when reset function type state during reset state upon exiting reset avss0 --- excvcc --- vss --- p174 input hi-z hi-z p175 input hi-z hi-z vcce --- p82 input hi-z hi-z p83 input hi-z hi-z p84 input hi-z hi-z p85 input hi-z hi-z p86 input hi-z hi-z p87 input hi-z hi-z vss --- excvdd --- p61 input hi-z hi-z p62 input hi-z hi-z p63 input hi-z hi-z sbi# input hi-z hi-z p70 input hi-z hi-z p71 input hi-z hi-z p72 input hi-z hi-z p73 input hi-z hi-z p74 input hi-z hi-z p75 input hi-z hi-z p76 input hi-z hi-z p77 input hi-z hi-z p93 input hi-z hi-z p94 input hi-z hi-z condition 88 p95/to18 p95 to18 - input/output 89 p96/to19 p96 to19 - input/output 90 p97/to20 p97 to20 - input/output 91 reset# - reset# - input 92 mod0 - mod0 - input 93 mod1 - mod1 - input 94 fp - fp - input 95 vcce - vcce -- 96 vss - vss -- 97 p110/to0 p110 to0 - input/output 98 p111/to1 p111 to1 - input/output 99 p112/to2 p112 to2 - input/output 100 p113/to3 p113 to3 - input/output 101 p114/to4 p114 to4 - input/output 102 p115/to5 p115 to5 - input/output 103 p116/to6 p116 to6 - input/output 104 p117/to7 p117 to7 - input/output 105 p100/to8 p100 to8 - input/output 106 p101/to9 p101 to9 - input/output 107 p102/to10 p102 to10 - input/output 108 vdde - vdde -- 109 jtms (note 1) - jtms - input 110 jtck (note 1) - jtck - input 111 jtrst (note 1) - jtrst - input 112 jtdo (note 1) - jtdo - output 113 jtdi (note 1) - jtdi - input 114 p103/to11 p103 to11 - input/output 115 p104/to12 p104 to12 - input/output 116 p105/to13 p105 to13 - input/output 117 p106/to14 p106 to14 - input/output p95 input hi-z hi-z p96 input hi-z hi-z p97 input hi-z hi-z reset# input hi-z hi-z mod0 input hi-z hi-z mod1 input hi-z hi-z fp input hi-z hi-z vcce --- vss --- p110 input hi-z hi-z p111 input hi-z hi-z p112 input hi-z hi-z p113 input hi-z hi-z p114 input hi-z hi-z p115 input hi-z hi-z p116 input hi-z hi-z p117 input hi-z hi-z p100 input hi-z hi-z p101 input hi-z hi-z p102 input hi-z hi-z vdde --- jtms input hi-z hi-z jtck input hi-z hi-z jtrst input hi-z hi-z jtdo output hi-z hi-z jtdi input hi-z hi-z p103 input hi-z hi-z p104 input hi-z hi-z p105 input hi-z hi-z p106 input hi-z hi-z note 1: the jtck, jtdi, jtdo and jtms pins are reset by input from the jtrst pin, and not reset from the reset# pin. when a low level is applied to the jtrst pin, the jtck, jtdi, jtdo and jtms pins are in the high impedance state.
1 1-17 overview 32176 group user?s manual (rev.1.01) 1.4 pin assignments during single-chip mode p43 input hi-z hi-z during external extension and processor modes rd# output hi-z high level during single-chip mode p44 input hi-z hi-z during external extension and processor modes cs0# output hi-z high level during single-chip mode p45 input hi-z hi-z during external extension and processor modes cs1# output hi-z high level during single-chip mode p46 input hi-z hi-z during external extension and processor modes a13 output hi-z undefined during single-chip mode p47 input hi-z hi-z during external extension and processor modes a14 output hi-z undefined p220 input hi-z hi-z table 1.4.1 pin assignments of the 32176 (4/4) port other than port other than port 118 p107/to15 p107 to15 - input/output 119 p124/tclk0 p124 tclk0 - input/output 120 p125/tclk1 p125 tclk1 - input/output 121 p126/tclk2 p126 tclk2 - input/output 122 p127/tclk3 p127 tclk3 - input/output 123 mod2 - mod2 - - 124 p130/tin16 p130 tin16 - input/output 125 p131/tin17 p131 tin17 - input/output 126 p132/tin18 p132 tin18 - input/output 127 p133/tin19 p133 tin19 - input/output 128 p134/tin20 p134 tin20 - input/output 129 p135/tin21 p135 tin21 - input/output 130 p136/tin22 p136 tin22 - input/output 131 p137/tin23 p137 tin23 - input/output 132 vcce - vcce - - 133 p150/tin0 p150 tin0 - input/output 134 p153/tin3 p153 tin3 - input/output 135 p41/blw#/ble# p41 blw# ble# input/output 136 p42/bhw#/bhe# p42 bhw# bhe# input/output 137 excvcc - excvcc - - 138 vss - vss - - symbol type function pin no. pin state when reset function type state during reset state upon exiting reset p107 input hi-z hi-z p124 input hi-z hi-z p125 input hi-z hi-z p126 input hi-z hi-z p127 input hi-z hi-z mod2--- p130 input hi-z hi-z p131 input hi-z hi-z p132 input hi-z hi-z p133 input hi-z hi-z p134 input hi-z hi-z p135 input hi-z hi-z p136 input hi-z hi-z p137 input hi-z hi-z vcce - - - p150 input hi-z hi-z p153 input hi-z hi-z p41 input hi-z hi-z p42 input hi-z hi-z excvcc - - - vss - - - condition 144 p220/ctx0 p220 ctx0 - input/output 139 p43/rd# p43 rd# - input/output input/output 140 p44/cs0# p44 cs0# - input/output 142 p46/a13 p46 a13 143 p47/a14 p47 a14 - input/output - input/output 141 p45/cs1# p45 cs1# -
1-18 1 overview 32176 group user?s manual (rev.1.01) 1.4 pin assignments this page is blank for reasons of layout.
chapter 2 cpu 2.1 cpu registers 2.2 general-purpose registers 2.3 control registers 2.4 accumulator 2.5 program counter 2.6 data formats 2.7 supplementary explanation for lock and unlock instruction execution
2 2-2 32176 group user?s manual (rev.1.01) cpu 2.1 cpu registers 2.1 cpu registers the m32r contains 16 general-purpose registers, five control registers, an accumulator and a program counter. the accumulator is configured with 56 bits, and all other registers are 32 bits wide. 2.2 general-purpose registers the 16 general-purpose registers (r0?r15) are of 32-bit width and are used to retain data, base address, etc. r14 is used as the link register and r15 as the stack pointer. the link register is used to store the return address when executing a subroutine call instruction. the interrupt stack pointer (spi) and the user stack pointer (spu) are alternately represented by r15 depending on the value of the stack mode (sm) bit in the processor status word register (psw). upon exiting the reset state, the value of the general-purpose registers is undefined. figure 2.2.1 general-purpose registers b0 b0 b31 r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 (link register) r15 (stack pointer) (note 1) note 1: the stack pointer functions as either the spi or the spu depending on the value of the sm bit in the psw. b31
2 2-3 32176 group user?s manual (rev.1.01) cpu 2.3 control registers 2.3 control registers there are 5 control registers which are the processor status word register (psw), the condition bit register (cbr), the interrupt stack pointer (spi), the user stack pointer (spu) and the backup pc (bpc). the dedicated mvtc and mvfc instructions are used for writing and reading these control registers. figure 2.3.1 control registers b0 backup pc bpc cr6 b31 psw cbr spi spu cr0 cr1 cr2 cr3 processor status word register condition bit register interrupt stack pointer user stack pointer crn notes:  crn (n = 0-3 and 6) denotes the control register number.  the dedicated mvtc and mvfc instructions are used for writing and reading these control registers.
2 2-4 32176 group user?s manual (rev.1.01) cpu 2.3.1 processor status word register: psw (cr0) the processor status word register (psw) indicates the m32r status. it consists of the psw field which is regularly used, and the bpsw field where a copy of the psw field is saved when an eit occurs. the psw field consists of the stack mode (sm) bit, the interrupt enable (ie) bit and the condition (c) bit. the bpsw field consists of the backup stack mode (bsm) bit, the backup interrupt enable (bie) bit and the backup condition (bc) bit. upon exiting the reset state, bsm, bie and bc are undefined. all other bits are "0". 0000 0 00 0000000 7 6 5 4 3 2 1 8 9 1011121314b15 b0 ? ? 00000?00000000 bc sm ie c 23 24 25 26 27 28 29 30 b31 17 18 19 20 21 22 b16 bie bsm bpsw field 0 0 psw field b bit name function r w 0?15 no function assigned. fix to "0". 00 16 bsm saves value of sm bit when eit occurs r w backup sm bit 17 bie saves value of ie bit when eit occurs r w backup ie bit 18?22 no function assigned. fix to "0". 00 23 bc saves value of c bit when eit occurs r w backup c bit 24 sm 0: uses r15 as the interrupt stack pointer r w stack mode bit 1: uses r15 as the user stack pointer 25 ie 0: does not accept interrupt r w interrupt enable bit 1: accepts interrupt 26?30 no function assigned. fix to "0". 00 31 c indicates carry, borrow or overflow resulting r w condition bit from operations (instruction dependent) 2.3 control registers
2 2-5 32176 group user?s manual (rev.1.01) cpu 2.3 control registers 2.3.2 condition bit register: cbr (cr1) the condition bit register (cbr) is derived from the psw register by extracting its condition (c) bit. the value written to the psw register?s c bit is reflected in this register. the register can only be read. (writing to the register with the mvtc instruction is ignored.) upon exiting the reset state, the value of cbr is h?0000 0000. b0 b31 0000000000000000000000000000000 c cbr 2.3.3 interrupt stack pointer: spi (cr2) and user stack pointer: spu (cr3) the interrupt stack pointer (spi) and the user stack pointer (spu) retain the address of the current stack pointer. these registers can be accessed as the general-purpose register r15. r15 switches between repre- senting the spi and spu depending on the value of the stack mode (sm) bit in the psw. upon exiting the reset state, the values of the spi and spu are undefined. b0 b31 spi spi b0 b31 spu spu 2.3.4 backup pc: bpc (cr6) the backup pc (bpc) is used to save the value of the program counter (pc) when an eit occurs. bit 31 is fixed to "0". when an eit occurs, the register sets either the pc value immediately before the eit occurred or the pc value for the next instruction. the bpc value is loaded to the pc when the rte instruction is executed. however, the values of the lower 2 bits of the pc are always "00" when returned. (pc always returns to the word-aligned address.) upon exiting the reset state, the value of the bpc is undefined. b0 b31 0 bpc bpc
2 2-6 32176 group user?s manual (rev.1.01) cpu 2.4 accumulator 2.4 accumulator the accumulator (acc) is a 56-bit register used for dsp function instructions. the accumulator is handled as a 64-bit register when accessed for read or write. when reading data from the accumulator, the value of bit 8 is sign-extended. when writing data to the accumulator, bits 0 to 7 are ignored. the accumulator is also used for the multiply instruction ?mul,? in which case the accumulator value is destroyed by instruction execution. use the mvtachi and mvtaclo instructions for writing to the accumulator. the mvtachi and mvtaclo instructions write data to the high-order 32 bits (bits 0?31) and the low-order 32 bits (bits 32?63), respectively. use the mvfachi, mvfaclo and mvfacmi instructions for reading data from the accumulator. the mvfachi, mvfaclo and mvfacmi instructions read data from the high-order 32 bits (bits 0?31), the low-order 32 bits (bits 32?63) and the middle 32 bits (bits 16?47), respectively. upon exiting the reset state, the value of accumulator is undefined. 15 b0 16 7 8 31 32 47 48 b63 acc (note 1) read range of mvfacmi instruction write and read ranges of mvtaclo and mvfaclo instructions write and read ranges of mvtachi and mvfachi instructions note 1: when read, bits 0 to 7 always show the sign-extended value of the value of bit 8. writing to this bit field is ignored. 2.5 program counter the program counter (pc) is a 32-bit counter that retains the address of the instruction being executed. since the m32r instruction starts with even-numbered addresses, the lsb (bit 31) is always "0". upon exiting the reset state, the value of pc is h?0000 0000. b0 b31 0 pc pc
2 2-7 32176 group user?s manual (rev.1.01) cpu 2.6 data formats 2.6 data formats 2.6.1 data types the data types that can be handled by the m32r instruction set are signed or unsigned 8, 16 and 32-bit integers. the signed integers are represented by 2?s complements. figure 2.6.1 data types signed byte (8-bit) integer unsigned byte (8-bit) integer signed halfword (16-bit) integer unsigned halfword (16-bit) integer signed word (32-bit) integer unsigned word (32-bit) integer b0 b0 b0 b0 b0 b0 b7 b7 b15 b15 b31 b31 s s s s: sign bit
2 2-8 32176 group user?s manual (rev.1.01) cpu 2.6 data formats 2.6.2 data formats (1) data formats in registers the data sizes in the m32r registers are always words (32 bits). when loading byte (8-bit) or halfword (16-bit) data from memory into a register, the data is sign-extended (ldb, ldh instructions) or zero-extended (ldub, lduh instructions) to a word (32-bit) quantity before being loaded in the register. when storing data from a register into a memory, the 32-bit data, the 16-bit data on the lsb side and the 8- bit data on the lsb side of the register are stored into memory by the st, sth and stb instructions, respectively. figure 2.6.2 data formats in registers rn b0 b31 byte rn b0 b31 halfword rn b0 b31 word sign-extended (ldb instruction) or zero-extended (ldub instruction) from memory (ldb, ldub instructions) rn b0 b31 byte rn b0 b31 halfword rn b0 b31 word to memory (stb instruction) to memory (sth instruction) to memor y (st instruction) from memory (ldh, lduh instructions) from memory (ld instruction) sign-extended (ldh instruction) or zero-extended (lduh instruction) 24 16 24 16
2 2-9 32176 group user?s manual (rev.1.01) cpu 2.6 data formats (2) data formats in memory the data sizes in memory can be byte (8 bits), halfword (16 bits) or word (32 bits). although byte data can be located at any address, halfword and word data must be located at the addresses aligned with a halfword boundary (least significant address bit = "0") or a word boundary (two low-order address bits = "00"), respectively. if an attempt is made to access memory data that overlaps the halfword or word bound- ary, an address exception occurs. figure 2.6.3 data formats in memory address byte halfword word +0 address +1 address +2 address +3 address b0 b31 byte byte byte byte halfword halfword word 7 8 15 16 23 24 b0 15 b0 b31 b31
2 2-10 32176 group user?s manual (rev.1.01) cpu 2.6 data formats (3) endian the diagrams below show a general endian system and the endian adopted for the m32r family micro- computers. bit endian (h'01) byte endian (h'01234567) big endian little endian note:  even when bits are arranged in big endian, h'01 is not b'10000000. hh hl lh ll h'01 h'23 h'45 h'67 ll lh hl hh h'67 h'45 h'23 h'01 b'0000001 b0 b7 b'0000001 b7 b0 figure 2.6.4 general endian system little/little ll lh hl hh big/big hh hl lh ll little/big hh hl lh ll endian (bit/byte) data arrangement renesas microcomputer family name 7700 and m16c families m32r family 31?24 7?0 23?16 15?8 0?7 24?31 8?15 16?23 bit number +0 +1 +2 +3 +0 +1 +2 +3 +0 +1 +2 +3 address example: 0x01234567 .byte 67,45,23,01 .byte 01,23,45,67 .byte 01,23,45,67 note:  the m32r family uses the big endian for both bits and bytes. 7?0 31?24 15?8 23?16 figure 2.6.5 endian adopted for the m32r family
2 2-11 32176 group user?s manual (rev.1.01) cpu 2.6 data formats  constant transfer ld24 rdest, #imm24 ldi rdest, #imm16 ldi rdest, #imm8 seth rdest, #imm16 b23 b0 rdest imm24 b31 b0 ld24 rdest, #imm24 b15 b0 rdest imm16 b31 b0 seth rdest, #imm16 00 8 15 00 00  register to register transfer mv rdest, rsrc  control register transfer mvfc rdest, crsrc mvtc rsrc, crdest rsrc b31 b0 rdest b31 b0 rsrc b31 b0 crdest b31 b0 mvtc rsrc, crdest mv rdest, rsrc note:  the condition bit c changes state when data is written to cr0 (psw) using the mvtc instruction. figure 2.6.6 transfer instructions (4) transfer instructions
2 2-12 32176 group user?s manual (rev.1.01) cpu 2.6 data formats (5) transfer from memory (signed) to registers  signed 32 bits ld24 rsrc, #label ld rdest, @rsrc  signed 16 bits ld24 rsrc, #label ldh rdest, @rsrc  signed 8 bits ld24 rsrc, #label ldb rdest, @rsrc label rdest b31 b0 +0 +1 +2 +3 rdest label 00 00 ff ff determined by msb b31 b0 +0 +1 +2 +3 rdest label 00 00 00 ff ff ff b31 b0 +0 +1 +2 +3 determined by msb memory register 0: positive number 1: negative number 0: positive number 1: negative number  unsigned 32 bits ld24 rsrc, #label ld rdest, @rsrc  unsigned 16 bits ld24 rsrc, #label ldub rdest, @rsrc  unsigned 8 bits ld24 rsrc, #label lduh rdest, @rsrc rdest 00 00 b31 b0 label +0 +1 +2 +3 label +0 +1 +2 +3 rdest b31 b0 label +0 +1 +2 +3 rdest 00 00 00 b31 b0 memory register figure 2.6.7 transfer from memory (signed) to registers (6) transfer from memory (unsigned) to registers figure 2.6.8 transfer from memory (unsigned) to registers
2 2-13 32176 group user?s manual (rev.1.01) cpu 2.6 data formats (7) notes on data transfer when transferring data, be aware that data arrangements in registers and memory are different.  word data (32 bits) +0 +1 +2 +3 b0 b31 hh hl lh ll b0 b31 hh hl lh ll  halfword data (16 bits) +0 +1 +2 +3 b0 b31 h l b0 b15 h l  byte data (8 bits) +0 +1 +2 +3 b0 b31 b0 b7 (r0?r15) (r0?r15) (r0?r15) +0 +1 +2 +3 b0 b31 b8 b15 (r0?r15) +0 +1 +2 +3 b0 b31 b16 b23 (r0?r15) +0 +1 +2 +3 b0 b31 b24 b31 (r0?r15) +0 +1 +2 +3 b0 b31 h l b16 b31 h l (r0?r15) data in registers data in memory figure 2.6.9 difference in data arrangements
2 2-14 32176 group user?s manual (rev.1.01) cpu 2.7 supplementary explanation for lock and unlock instruction execution the lock instruction sets the lock bit, as well as performs an ordinary load operation. the unlock instruction is used to clear the lock bit. the lock bit is located inside the cpu, and cannot directly be accessed for read or write by users. this bit controls granting of bus control requested by devices other than the cpu. ? when lock bit = "0" control of the bus requested by devices other than the cpu is granted ? when lock bit = "1" control of the bus requested by devices other than the cpu is denied control of the bus may be requested by devices other than the cpu in the following two cases: ? when dma transfer is requested by the internal dmac ? when hreq# input is pulled low to request that the cpu be placed in a hold state 2.7 supplementary explanation for bset, bclr, lock and unlock instruction execution
chapter 3 address space 3.1 outline of the address space 3.2 operation modes 3.3 internal rom and external extension areas 3.4 internal ram and sfr areas 3.5 eit vector entry 3.6 icu vector table 3.7 notes about address space
3 3-2 address space 3.1 outline of the address space 32176 group user?s manual (rev.1.01) 3.1 outline of the address space the logical addresses of the m32r are always handled in 32 bits, providing a linear address space of up to 4 gbytes. the address space of the m32r consists of the following: (1) user space ? internal rom area ? external extension area ? internal ram area ? sfr (special function register) area (2) system space (not open to the user) (1) user space the 2 gbytes from the address h?0000 0000 to the address h?7fff ffff comprise the user space. located in this space are the internal rom area, an external extension area, the internal ram area and the sfr (special function register) area (in which a set of internal peripheral i/o registers exist). of these, the internal rom and external extension areas are located differently depending on mode settings as will be described later. (2) system space the 2 gbytes from the address h?8000 0000 to the address h?ffff ffff comprise the system space. this space is reserved for use by development tools such as an in-circuit emulator and debug monitor, and cannot be used by the user.
3 3-3 address space 3.1 outline of the address space 32176 group user?s manual (rev.1.01) h'0000 0000 h'7fff ffff h'8000 0000 user space eit vector entry logical address h'ffff ffff system space (16 mbytes) h'0000 0000 h'00ff ffff h'007f ffff h'0080 0000 sfr area (16 kbytes) h'0080 3fff h'0080 4000 user rom area (512 kbytes) external extension area (4 mbytes) ghost area in 128-kbyte units 2 gbytes 2 gbytes ghost area in 16-mbyte units ghost area in 4-mbyte units internal ram (24 kbytes) h'0080 9fff reserved area (88 kbytes) h'0081 ffff h'0082 0000 h'0080 a000 h'0040 0000 cs1 area (1 mbyte) cs0 area (1 mbyte) h'003f ffff h'000f ffff h'0010 0000 h'0007 ffff reserved area (512 kbytes) h'001f ffff h'0020 0000 h'002f ffff h'0030 0000 ghost area of cs1 (1 mbyte) h'0008 0000 figure 3.1.1 address space of the m32176f4
3 3-4 address space 3.1 outline of the address space 32176 group user?s manual (rev.1.01) h'0000 0000 h'7fff ffff h'8000 0000 user space logical address h'ffff ffff system space h'0000 0000 h'00ff ffff h'007f ffff h'0080 0000 h'0080 3fff h'0080 4000 external extension area (4 mbytes) 2 gbytes 2 gbytes ghost area in 16-mbyte units h'0080 9fff h'0081 ffff h'0082 0000 h'0080 a000 h'0040 0000 h'003f ffff h'000f ffff h'0010 0000 h'0005 ffff h'001f ffff h'0020 0000 h'002f ffff h'0030 0000 h'0006 0000 eit vector entry user rom area (384 kbytes) (640 kbytes) reserved area sfr area (16 kbytes) ghost area in 128-kbyte units internal ram (24 kbytes) reserved area (88 kbytes) cs1 area (1 mbyte) cs0 area (1 mbyte) ghost area of cs1 (1 mbyte) ghost area in 4-mbyte units (16 mbytes) figure 3.1.2 address space of the m32176f3
3 3-5 address space 3.1 outline of the address space 32176 group user?s manual (rev.1.01) figure 3.1.2 address space of the m32176f2 h'0000 0000 h'7fff ffff h'8000 0000 h'ffff ffff h'0000 0000 h'00ff ffff h'007f ffff h'0080 0000 h'0080 3fff h'0080 4000 h'0080 9fff h'0081 ffff h'0082 0000 h'0080 a000 h'0040 0000 h'003f ffff h'000f ffff h'0010 0000 h'0003 ffff h'001f ffff h'0020 0000 h'002f ffff h'0030 0000 h'0004 0000 user space logical address system space (16 mbytes) 2 gbytes 2 gbytes ghost area in 16-mbyte units eit vector entry sfr area (16 kbytes) external extension area (4 mbytes) ghost area in 128-kbyte units internal ram (24 kbytes) reserved area (88 kbytes) cs1 area (1 mbyte) cs0 area (1 mbyte) reserved area ghost area of cs1 (1 mbyte) user rom area (256 kbytes) ghost area in 4-mbyte units (768 kbytes)
3 3-6 address space 32176 group user?s manual (rev.1.01) figure 3.2.1 m32176f4 operation modes and internal rom/external extension areas 3.2 operation modes the microcomputer is placed in one of the following modes depending on how cpu operation mode is set by mod0 and mod1 pins. the operation mode used for rewriting the internal flash memory is described separately in section 6.5, ?programming the internal flash memory.? table 3.2.1 operation mode settings mod0 mod1 mod2 (note 1) operation mode (note 2) vss vss vss single-chip mode vss vcce vss external extension mode vcce vss vss processor mode (fp = vss) vcce vcce vss reserved (use inhibited) -- vcce reserved (use inhibited) note 1: connect vcce and vss to the vcce input power supply and ground, respectively. note 2: for the operation mode used to rewrite the internal flash memory (fp = vcce) which is not shown in the above table, see section 6.5, ?programming the internal flash memory.? the internal rom and external extension areas are located differently depending on how operation mode is set. (all other areas in the address space are located the same way.) the diagram below shows how the internal rom and external extension areas are mapped into the address space in each operation mode. (for flash rewrite mode, see section 6.5, ?programming the internal flash memory.?) 3.2 operation modes h'0000 0000 h'0007 ffff h'0008 0000 h'003f ffff non-cs0 area (internal rom access area) cs1 area (1 mbyte) cs0 area (1 mbyte) cs1 area (1 mbyte) internal rom area (512 kbytes) h'001f ffff h'0020 0000 cs0 area (1 mbyte) h'000f ffff h'0010 0000 reserved area (512 kbytes) h'002f ffff h'0030 0000 ghost area of cs1 (1 mbyte) extended e xternal are a extended e xternal are a ghost area of cs0 (1 mbyte) ghost area of cs1 (1 mbyte) internal rom area (512 kbytes)
3 3-7 address space 32176 group user?s manual (rev.1.01) figure 3.2.3 m32176f2 operation modes and internal rom/external extension areas figure 3.2.2 m32176f3 operation modes and internal rom/external extension areas 3.2 operation modes h'0000 0000 h'0005 ffff h'0006 0000 h'003f ffff h'001f ffff h'0020 0000 h'000f ffff h'0010 0000 h'002f ffff h'0030 0000 non-cs0 area cs1 area (1 mbyte) cs0 area (1 mbyte) cs1 area (1 mbyte) internal rom area (384 kbytes) cs0 area (1 mbyte) reserved area (640 kbytes) ghost area of cs1 (1 mbyte) extended e xternal are a extended e xternal are a ghost area of cs0 (1 mbyte) ghost area of cs1 (1 mbyte) internal rom area (384 kbytes) h'0000 0000 h'0003 ffff h'0004 0000 h'003f ffff h'001f ffff h'0020 0000 h'000f ffff h'0010 0000 h'002f ffff h'0030 0000 non-cs0 area cs1 area (1 mbyte) cs0 area (1 mbyte) cs1 area (1 mbyte) internal rom area (256 kbytes) cs0 area (1 mbyte) reserved area (768 kbytes) ghost area of cs1 (1 mbyte) extended e xternal are a extended e xternal are a ghost area of cs0 (1 mbyte) ghost area of cs1 (1 mbyte) internal rom area (256 kbytes)
3 3-8 address space 32176 group user?s manual (rev.1.01) 3.3 internal rom and external extension areas the 8-mbyte area in the user space from the address h?0000 0000 to the address h?007f ffff comprise the internal rom and external extension areas. for the address mapping of these areas that differs with each operation mode, see section 3.2, ?operation modes.? 3.3.1 internal rom area the internal rom is allocated to the addresses shown below. located at the beginning of this area is the eit vector entry (and the icu vector table). table 3.3.1 internal rom allocation address type name size allocation address m32176f4 512 kbytes h?0000 0000 to h?0007 ffff m32176f3 384 kbytes h?0000 0000 to h?0005 ffff m32176f2 256 kbytes h?0000 0000 to h?0003 ffff 3.3.2 external extension area the external extension area is only available when external extension or processor mode is selected by operation mode settings. when accessing the external extension area, the control signals necessary to access external devices are output. the cs0# and cs1# signals are output corresponding to the address mapping of the external extension area. the cs0# and cs1# signals are output for the cs0 and cs1 areas, respectively. table 3.3.2 address mapping of the external extension area in each operation mode operation mode address mapping of external extension area single-chip mode none external extension mode h?0010 0000 to h?001f ffff (cs0 area: 1 mbyte) h?0020 0000 to h?002f ffff (cs1 area: 1 mbyte) (note 1) processor mode h?0000 0000 to h?000f ffff (cs0 area: 1 mbyte) (note 2) h?0020 0000 to h?002f ffff (cs1 area: 1 mbyte) (note 2) 3.3 internal rom and external extension areas note 1: during external extension mode, a ghost (1 mbyte) of the cs1 area appears in an area of h'0030 0000 thr ough h'003f ffff. note 2: during processor mode, a ghost (1 mbyte) of the cs0 area appears in an area of h'0010 0000 through h'001f ffff and a ghost (1 mbyte) of the cs1 area appears in an area of h'0030 0000 through h'003f ffff.
3 3-9 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) 3.4 internal ram and sfr areas the 8-mbyte area from the address h?0080 0000 to the address h?00ff ffff comprise the internal ram and sfr (special function register) areas. of these, the space that the user can actually use is a 128-kbyte area from the address h?0080 0000 to the address h?0081 ffff. the other areas here are ghosts in 128-kbyte units. (do not use the ghost area intentionally during programming.) 3.4.1 internal ram area the internal ram area is allocated to the addresses shown below. table 3.4.1 internal ram allocation address type name size allocation address m32176f4 24 kbytes h?0080 4000 to h?0080 9fff m32176f3 24 kbytes h?0080 4000 to h?0080 9fff m32176f2 24 kbytes h?0080 4000 to h?0080 9fff 3.4.2 sfr (special function register) area the addresses h?0080 0000 to h?0080 3ffff comprise the sfr (special function register) area. located in this area are the internal peripheral i/o registers. figure 3.4.1 internal ram and sfr (special function register) areas sfr area (16 kbytes) h'0080 0000 h'0080 3fff h'0080 4000 h'0080 9fff internal ram (24 kbytes) virtual flash emulation areas separated in 8- or 4-kbyte units can be allocated here. for details, see section 6.6.
3 3-10 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) figure 3.4.2 outline mapping of the sfr area h'0080 0000 h'0080 007e h'0080 0180 h'0080 0080 h'0080 00ee h'0080 0100 h'0080 0146 mjt(top) mjt(tio) mjt(tms) h'0080 0200 h'0080 0240 h'0080 0300 h'0080 03c0 h'0080 03e0 h'0080 03fe 0 7 8 15 0 7 8 15 flash control h'0080 07e0 h'0080 07f2 h'0080 023e h'0080 02fe mjt(tml1) h'0080 0fe0 h'0080 0ffe h'0080 0400 dmac h'0080 0478 can1 can0 h'0080 1000 h'0080 11fe h'0080 0700 h'0080 077f h'0080 03be h'0080 03d8 mjt(tml0) h'0080 1400 h'0080 15fe h'0080 3ffe +1 address +0 address interrupt controller (icu) a-d converter serial i/o wait controller mjt (common part) multijunction timer (mjt) input/output port note: ? the real-time debugger (rtd) is an independent module that is operated from the outside, and is transparent to the cpu. multijunction timer (mjt) +1 address +0 address
3 3-11 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) | sfr area register map (1/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0000 interrupt vector register 5-5 (ivect) h'0080 0002 (use inhibited area) h'0080 0004 interrupt request mask register (use inhibited area) 5-6 (imask) h'0080 0006 sbi control register (use inhibited area) 5-7 (sbicr) (use inhibited area) h'0080 0060 can0 transmit/receive & error interrupt control register (use inhibited area) 5-8 (ican0cr) h'0080 0062 (use inhibited area) h'0080 0064 (use inhibited area) h'0080 0066 (use inhibited area) rtd interrupt control register 5-8 (irtdcr) h'0080 0068 sio2, 3 transmit/receive interrupt control register dma5?9 interrupt control register 5-8 (isio23cr) (idma59cr) h'0080 006a (use inhibited area) h'0080 006c a-d0 conversion interrupt control register sio0 transmit interrupt control register 5-8 (iad0ccr) (isio0txcr) h'0080 006e sio0 receive interrupt control register sio1 transmit interrupt control register 5-8 (isio0rxcr) (isio1txcr) h'0080 0070 sio1 receive interrupt control register dma0?4 interrupt control register 5-8 (isio1rxcr) (idma04cr) h'0080 0072 mjt output interrupt control register 0 mjt output interrupt control register 1 5-8 (imjtocr0) (imjtocr1) h'0080 0074 mjt output interrupt control register 2 mjt output interrupt control register 3 5-8 (imjtocr2) (imjtocr3) h'0080 0076 mjt output interrupt control register 4 mjt output interrupt control register 5 5-8 (imjtocr4) (imjtocr5) h'0080 0078 mjt output interrupt control register 6 mjt output interrupt control register 7 5-8 (imjtocr6) (imjtocr7) h'0080 007a (use inhibited area) mjt input interrupt control register 1 5-8 (imjticr1) h'0080 007c mjt input interrupt control register 2 mjt input interrupt control register 3 5-8 (iimjticr2) (imjticr3) h'0080 007e mjt input interrupt control register 4 can1 transmit/receive & error interrupt control register 5-8 (imjticr4) (ican1cr) h'0080 0080 a-d0 single mode register 0 a-d0 single mode register 1 11-14 (ad0sim0) (ad0sim1) 11-16 h'0080 0082 (use inhibited area) h'0080 0084 a-d0 scan mode register 0 a-d0 scan mode register 1 11-18 (ad0scm0) (ad0scm1) 11-20 h'0080 0086 a -d0 disconnection detection assist function control register a-d0 conversion speed control register 11-23 (ad0ddacr) (ad0cvscr) 11-22 h'0080 0088 a-d0 successive approximation register 11-27 (ad0sar) h'0080 008a a-d0 disconnection detection assist method select register 11-24 (ad0ddasel) h'0080 008c a-d0 comparate data register 11-28 (ad0cmp) h'0080 008e (use inhibited area) h'0080 0090 10-bit a-d0 data register 0 11-29 (ad0dt0) h'0080 0092 10-bit a-d0 data register 1 11-29 (ad0dt1) h'0080 0094 10-bit a-d0 data register 2 11-29 (ad0dt2) h'0080 0096 10-bit a-d0 data register 3 11-29 (ad0dt3) h'0080 0098 10-bit a-d0 data register 4 11-29 (ad0dt4) h'0080 009a 10-bit a-d0 data register 5 11-29 (ad0dt5)
3 3-12 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 009c 10-bit a-d0 data register 6 11-29 (ad0dt6) h'0080 009e 10-bit a-d0 data register 7 11-29 (ad0dt7) h'0080 00a0 10-bit a-d0 data register 8 11-29 (ad0dt8) h'0080 00a2 10-bit a-d0 data register 9 11-29 (ad0dt9) h'0080 00a4 10-bit a-d0 data register 10 11-29 (ad0dt10) h'0080 00a6 10-bit a-d0 data register 11 11-29 (ad0dt11) h'0080 00a8 10-bit a-d0 data register 12 11-29 (ad0dt12) h'0080 00aa 10-bit a-d0 data register 13 11-29 (ad0dt13) h'0080 00ac 10-bit a-d0 data register 14 11-29 (ad0dt14) h'0080 00ae 10-bit a-d0 data register 15 11-29 (ad0dt15) h'0080 00d0 (use inhibited area) 8-bit a-d0 data register 0 11-30 (ad08dt0) h'0080 00d2 (use inhibited area) 8-bit a-d0 data register 1 11-30 (ad08dt1) h'0080 00d4 (use inhibited area) 8-bit a-d0 data register 2 11-30 (ad08dt2) h'0080 00d6 (use inhibited area) 8-bit a-d0 data register 3 11-30 (ad08dt3) h'0080 00d8 (use inhibited area) 8-bit a-d0 data register 4 11-30 (ad08dt4) h'0080 00da (use inhibited area) 8-bit a-d0 data register 5 11-30 (ad08dt5) h'0080 00dc (use inhibited area) 8-bit a-d0 data register 6 11-30 (ad08dt6) h'0080 00de (use inhibited area) 8-bit a-d0 data register 7 11-30 (ad08dt7) h'0080 00e0 (use inhibited area) 8-bit a-d0 data register 8 11-30 (ad08dt8) h'0080 00e2 (use inhibited area) 8-bit a-d0 data register 9 11-30 (ad08dt9) h'0080 00e4 (use inhibited area) 8-bit a-d0 data register 10 11-30 (ad08dt10) h'0080 00e6 (use inhibited area) 8-bit a-d0 data register 11 11-30 (ad08dt11) h'0080 00e8 (use inhibited area) 8-bit a-d0 data register 12 11-30 (ad08dt12) h'0080 00ea (use inhibited area) 8-bit a-d0 data register 13 11-30 (ad08dt13) h'0080 00ec (use inhibited area) 8-bit a-d0 data register 14 11-30 (ad08dt14) h'0080 00ee (use inhibited area) 8-bit a-d0 data register 15 11-30 (ad08dt15) (use inhibited area) h'0080 0100 sio23 interrupt request status register sio03 interrupt request mask register 12-9 (si23stat) (si03mask) 12-10 h'0080 0102 sio03 interrupt request source select register (use inhibited area) 12-11 (si03sel) (use inhibited area) h'0080 0110 sio0 transmit control register sio0 transmit/receive mode register 12-13 (s0tcnt) (s0mod) 12-15 h'0080 0112 sio0 transmit buffer register 12-18 (s0txb) h'0080 0114 sio0 receive buffer register 12-19 (s0rxb) h'0080 0116 sio0 receive control register sio0 baud rate register 12-20 (s0rcnt) (s0baur) 12-23 sfr area register map (2/22) | |
3 3-13 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) | | | | address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0118 sio0 special mode register (use inhibited area) 12-24 (s0smod) (use inhibited area) h'0080 0120 sio1 transmit control register sio1 transmit/receive mode register 12-13 (s1tcnt) (s1mod) 12-15 h'0080 0122 sio1 transmit buffer register 12-18 (s1txb) h'0080 0124 sio1 receive buffer register 12-19 (s1rxb) h'0080 0126 sio1 receive control register sio1 baud rate register 12-20 (s1rcnt) (s1baur) 12-23 h'0080 0128 sio1 special mode register (use inhibited area) 12-24 (s1smod) (use inhibited area) h'0080 0130 sio2 transmit control register sio2 transmit/receive mode register 12-13 (s2tcnt) (s2mod) 12-15 h'0080 0132 sio2 transmit buffer register 12-18 (s2txb) h'0080 0134 sio2 receive buffer register 12-19 (s2rxb) h'0080 0136 sio2 receive control register sio2 baud rate register 12-20 (s2rcnt) (s2baur) 12-23 (use inhibited area) h'0080 0140 sio3 transmit control register sio3 transmit/receive mode register 12-13 (s3tcnt) (s3mod) 12-15 h'0080 0142 sio3 transmit buffer register 12-18 (s3txb) h'0080 0144 sio3 receive buffer register 12-19 (s3rxb) h'0080 0146 sio3 receive control register sio3 baud rate register 12-20 (s3rcnt) (s3baur) 12-23 (use inhibited area) h'0080 0180 wait cycles control register (use inhibited area) 16-4 (wtccr) (use inhibited area) h'0080 0200 (use inhibited area) clock bus & input event bus control register 10-13 (ckiebcr) h'0080 0202 prescaler register 0 prescaler register 1 10-9 (prs0) (prs1) h'0080 0204 prescaler register 2 output event bus control register 10-9 (prs2) (oebcr) 10-14 (use inhibited area) h'0080 0210 tclk input processing control register 10-17 (tclkcr) h'0080 0212 tin input processing control register 0 10-18 (tincr0) h'0080 0214 (use inhibited area) h'0080 0216 (use inhibited area) h'0080 0218 tin input processing control register 3 10-19 (tincr3) h'0080 021a tin input processing control register 4 10-19 (tincr4) h'0080 021c (use inhibited area) h'0080 021e (use inhibited area) h'0080 0220 f/f source select register 0 10-21 (ffs0) h'0080 0222 (use inhibited area) f/f source select register 1 10-22 (ffs1) h'0080 0224 f/f protect register 0 10-23 (ffp0) sfr area register map (3/22) | |
3 3-14 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0226 f/f data register 0 10-24 (ffd0) h'0080 0228 (use inhibited area) f/f protect register 1 10-23 (ffp1) h'0080 022a (use inhibited area) f/f data register 1 10-24 (ffd1) (use inhibited area) h'0080 0230 top interrupt control register 0 top interrupt control register 1 10-29 (topir0) (topir1) h'0080 0232 top interrupt control register 2 top interrupt control register 3 10-31 (topir2) (topir3) 10-32 h'0080 0234 tio interrupt control register 0 tio interrupt control register 1 10-33 (tioir0) (tioir1) 10-34 h'0080 0236 tio interrupt control register 2 tms interrupt control register 10-35 (tioir2) (tmsir) 10-36 h'0080 0238 tin interrupt control register 0 tin interrupt control register 1 10-37 (tinir0) (tinir1) 10-38 h'0080 023a (use inhibited area) h'0080 023c tin interrupt control register 4 tin interrupt control register 5 10-39 (tinir4) (tinir5) h'0080 023e tin interrupt control register 6 (use inhibited area) 10-41 (tinir6) h'0080 0240 top0 counter 10-53 (top0ct) h'0080 0242 top0 reload register 10-54 (top0rl) h'0080 0244 (use inhibited area) h'0080 0246 top0 correction register 10-55 (top0cc) (use inhibited area) h'0080 0250 top1 counter 10-53 (top1ct) h'0080 0252 top1 reload register 10-54 (top1rl) h'0080 0254 (use inhibited area) h'0080 0256 top1 correction register 10-55 (top1cc) (use inhibited area) h'0080 0260 top2 counter 10-53 (top2ct) h'0080 0262 top2 reload register 10-54 (top2rl) h'0080 0264 (use inhibited area) h'0080 0266 top2 correction register 10-55 (top2cc) (use inhibited area) h'0080 0270 top3 counter 10-53 (top3ct) h'0080 0272 top3 reload register 10-54 (top3rl) h'0080 0274 (use inhibited area) h'0080 0276 top3 correction register 10-55 (top3cc) (use inhibited area) h'0080 0280 top4 counter 10-53 (top4ct) h'0080 0282 top4 reload register 10-54 (top4rl) h'0080 0284 (use inhibited area) sfr area register map (4/22) | | | | |
3 3-15 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0286 top4 correction register 10-55 (top4cc) (use inhibited area) h'0080 0290 top5 counter 10-53 (top5ct) h'0080 0292 top5 reload register 10-54 (top5rl) h'0080 0294 (use inhibited area) h'0080 0296 top5 correction register 10-55 (top5cc) h'0080 0298 (use inhibited area) h'0080 029a top0?5 control register 0 10-49 (top05cr0) h'0080 029c (use inhibited area) top0?5 control register 1 10-49 (top05cr1) h'0080 029e (use inhibited area) h'0080 02a0 top6 counter 10-53 (top6ct) h'0080 02a2 top6 reload register 10-54 (top6rl) h'0080 02a4 (use inhibited area) h'0080 02a6 top6 correction register 10-55 (top6cc) h'0080 02a8 (use inhibited area) h'0080 02aa top6, 7 control register 10-51 (top67cr) (use inhibited area) h'0080 02b0 top7 counter 10-53 (top7ct) h'0080 02b2 top7 reload register 10-54 (top7rl) h'0080 02b4 (use inhibited area) h'0080 02b6 top7 correction register 10-55 (top7cc) (use inhibited area) h'0080 02c0 top8 counter 10-53 (top8ct) h'0080 02c2 top8 reload register 10-54 (top8rl) h'0080 02c4 (use inhibited area) h'0080 02c6 top8 correction register 10-55 (top8cc) (use inhibited area) h'0080 02d0 top9 counter 10-53 (top9ct) h'0080 02d2 top9 reload register 10-54 (top9rl) h'0080 02d4 (use inhibited area) h'0080 02d6 top9 correction register 10-55 (top9cc) (use inhibited area) h'0080 02e0 top10 counter 10-53 (top10ct) h'0080 02e2 top10 reload register 10-54 (top10rl) h'0080 02e4 (use inhibited area) sfr area register map (5/22) | | | | |
3 3-16 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) address +0 address +1address see b0 b7 b8 b15 pages h'0080 02e6 top10 correction register 10-55 (top10cc) h'0080 02e8 (use inhibited area) h'0080 02ea top8?10 control register 10-52 (top810cr) (use inhibited area) h'0080 02fa top0-10 external enable permit register 10-56 (topeen) h'0080 02fc top0-10 enable protect register 10-56 (toppro) h'0080 02fe top0-10 count enable register 10-57 (topcen) h'0080 0300 tio0 counter 10-87 (tio0ct) h'0080 0302 (use inhibited area) h'0080 0304 tio0 reload 1 register 10-89 (tio0rl1) h'0080 0306 tio0 reload 0/ measure register 10-88 (tio0rl0) (use inhibited area) h'0080 0310 tio1 counter 10-87 (tio1ct) h'0080 0312 (use inhibited area) h'0080 0314 tio1 reload 1 register 10-89 (tio1rl1) h'0080 0316 tio1 reload 0/ measure register 10-88 (tio1rl0) h'0080 0318 (use inhibited area) h'0080 031a tio0?3 control register 0 10-80 (tio03cr0) h'0080 031c (use inhibited area) tio0?3 control register 1 10-81 (tio03cr1) h'0080 031e (use inhibited area) h'0080 0320 tio2 counter 10-87 (tio2ct) h'0080 0322 (use inhibited area) h'0080 0324 tio2 reload 1 register 10-89 (tio2rl1) h'0080 0326 tio2 reload 0/ measure register 10-88 (tio2rl0) (use inhibited area) h'0080 0330 tio3 counter 10-87 (tio3ct) h'0080 0332 (use inhibited area) h'0080 0334 tio3 reload 1 register 10-89 (tio3rl1) h'0080 0336 tio3 reload 0/ measure register 10-88 (tio3rl0) (use inhibited area) h'0080 0340 tio4 counter 10-87 (tio4ct) h'0080 0342 (use inhibited area) h'0080 0344 tio4 reload 1 register 10-89 (tio4rl1) h'0080 0346 tio4 reload 0/ measure register 10-88 (tio4rl0) h'0080 0348 (use inhibited area) sfr area register map (6/22) | | | |
3 3-17 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 034a tio4 control register tio5 control register 10-82 (tio4cr) (tio5cr) 10-84 (use inhibited area) h'0080 0350 tio5 counter 10-87 (tio5ct) h'0080 0352 (use inhibited area) h'0080 0354 tio5 reload 1 register 10-89 (tio5rl1) h'0080 0356 tio5 reload 0/ measure register 10-88 (tio5rl0) (use inhibited area) h'0080 0360 tio6 counter 10-87 (tio6ct) h'0080 0362 (use inhibited area) h'0080 0364 tio6 reload 1 register 10-89 (tio6rl1) h'0080 0366 tio6 reload 0/ measure register 10-88 (tio6rl0) h'0080 0368 (use inhibited area) h'0080 036a tio6 control register tio7 control register 10-85 (tio6cr) (tio7cr) 10-86 (use inhibited area) h'0080 0370 tio7 counter 10-87 (tio7ct) h'0080 0372 (use inhibited area) h'0080 0374 tio7 reload 1 register 10-89 (tio7rl1) h'0080 0376 tio7 reload 0/ measure register 10-88 (tio7rl0) (use inhibited area) h'0080 0380 tio8 counter 10-87 (tio8ct) h'0080 0382 (use inhibited area) h'0080 0384 tio8 reload 1 register 10-89 (tio8rl1) h'0080 0386 tio8 reload 0/ measure register 10-88 (tio8rl0) h'0080 0388 (use inhibited area) h'0080 038a tio8 control register tio9 control register 10-86 (tio8cr) (tio9cr) 10-87 (use inhibited area) h'0080 0390 tio9 counter 10-87 (tio9ct) h'0080 0392 (use inhibited area) h'0080 0394 tio9 reload 1 register 10-89 (tio9rl1) h'0080 0396 tio9 reload 0/ measure register 10-88 (tio9rl0) (use inhibited area) h'0080 03bc tio0-9 enable protect register 10-90 (tiopro) h'0080 03be tio0-9 count enable register 10-91 (tiocen) h'0080 03c0 tms0 counter 10-108 (tms0ct) h'0080 03c2 tms0 measure 3 register 10-108 (tms0mr3) sfr area register map (7/22) | | | | | |
3 3-18 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (8/22) address +0 address +1address see b0 b7 b8 b15 pages h'0080 03c4 tms0 measure 2 register 10-108 (tms0mr2) h'0080 03c6 tms0 measure 1 register 10-108 (tms0mr1) h'0080 03c8 tms0 measure 0 register 10-108 (tms0mr0) h'0080 03ca tms0 control register tms1 control register 10-107 (tms0cr) (tms1cr) (use inhibited area) h'0080 03d0 tms1 counter 10-108 (tms1ct) h'0080 03d2 tms1 measure 3 register 10-108 (tms1mr3) h'0080 03d4 tms1 measure 2 register 10-108 (tms1mr2) h'0080 03d6 tms1 measure 1 register 10-108 (tms1mr1) h'0080 03d8 tms1 measure 0 register 10-108 (tms1mr0) (use inhibited area) h'0080 03e0 tml0 counter (upper) 10-113 (tml0cth) h'0080 03e2 tml0 counter (lower) 10-113 (tml0ctl) (use inhibited area) h'0080 03ea (use inhibited area) tml0 control register 10-112 (tml0cr) (use inhibited area) h'0080 03f0 tml0 measure 3 register (upper) 10-114 (tml0mr3h) h'0080 03f2 tml0 measure 3 register (lower) 10-114 (tml0mr3l) h'0080 03f4 tml0 measure 2 register (upper) 10-114 (tml0mr2h) h'0080 03f6 tml0 measure 2 register (lower) 10-114 (tml0mr2l) h'0080 03f8 tml0 measure 1 register (upper) 10-114 (tml0mr1h) h'0080 03fa tml0 measure 1 register (lower) 10-114 (tml0mr1l) h'0080 03fc tml0 measure 0 register (upper) 10-114 (tml0mr0h) h'0080 03fe tml0 measure 0 register (lower) 10-114 (tml0mr0l) h'0080 0400 dma0?4 interrupt request status register dma0?4 interrupt request mask register 9-18 (dm04itst) (dm04itmk) 9-19 (use inhibited area) h'0080 0408 dma5?9 interrupt request status register dma5?9 interrupt request mask register 9-18 (dm59itst) (dm59itmk) 9-19 (use inhibited area) h'0080 0410 dma0 channel control register dma0 transfer count register 9-6 (dm0cnt) (dm0tct) 9-15 h'0080 0412 dma0 source address register 9-13 (dm0sa) h'0080 0414 dma0 destination address register 9-14 (dm0da) h'0080 0416 (use inhibited area) h'0080 0418 dma5 channel control register dma5 transfer count register 9-8 (dm5cnt) (dm5tct) 9-15 h'0080 041a dma5 source address register 9-13 (dm5sa) h'0080 041c dma5 destination address register 9-14 (dm5da) | | | | | |
3 3-19 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (9/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 041e (use inhibited area) h'0080 0420 dma1 channel control register dma1 transfer count register 9-6 (dm1cnt) (dm1tct) 9-15 h'0080 0422 dma1 source address register 9-13 (dm1sa) h'0080 0424 dma1 destination address register 9-14 (dm1da) h'0080 0426 (use inhibited area) h'0080 0428 dma6 channel control register dma6 transfer count register 9-9 (dm6cnt) (dm6tct) 9-15 h'0080 042a dma6 source address register 9-13 (dm6sa) h'0080 042c dma6 destination address register 9-14 (dm6da) h'0080 042e (use inhibited area) h'0080 0430 dma2 channel control register dma2 transfer count register 9-7 (dm2cnt) (dm2tct) 9-15 h'0080 0432 dma2 source address register 9-13 (dm2sa) h'0080 0434 dma2 destination address register 9-14 (dm2da) h'0080 0436 (use inhibited area) h'0080 0438 dma7 channel control register dma7 transfer count register 9-9 (dm7cnt) (dm7tct) 9-15 h'0080 043a dma7 source address register 9-13 (dm7sa) h'0080 043c dma7 destination address register 9-14 (dm7da) h'0080 043e (use inhibited area) h'0080 0440 dma3 channel control register dma3 transfer count register 9-7 (dm3cnt) (dm3tct) 9-15 h'0080 0442 dma3 source address register 9-13 (dm3sa) h'0080 0444 dma3 destination address register 9-14 (dm3da) h'0080 0446 (use inhibited area) h'0080 0448 dma8 channel control register dma8 transfer count register 9-10 (dm8cnt) (dm8tct) 9-15 h'0080 044a dma8 source address register 9-13 (dm8sa) h'0080 044c dma8 destination address register 9-14 (dm8da) h'0080 044e (use inhibited area) h'0080 0450 dma4 channel control register dma4 transfer count register 9-8 (dm4cnt) (dm4tct) 9-15 h'0080 0452 dma4 source address register 9-13 (dm4sa) h'0080 0454 dma4 destination address register 9-14 (dm4da) h'0080 0456 (use inhibited area) h'0080 0458 dma9 channel control register dma9 transfer count register 9-10 (dm9cnt) (dm9tct) 9-15 h'0080 045a dma9 source address register 9-13 (dm9sa) h'0080 045c dma9 destination address register 9-14 (dm9da) h'0080 045e (use inhibited area) h'0080 0460 dma0 software request generation register 9-12 (dm0sri) h'0080 0462 dma1 software request generation register 9-12 (dm1sri)
3 3-20 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (10/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0464 dma2 software request generation register 9-12 (dm2sri) h'0080 0466 dma3 software request generation register 9-12 (dm3sri) h'0080 0468 dma4 software request generation register 9-12 (dm4sri) (use inhibited area) h'0080 0470 dma5 software request generation register 9-12 (dm5sri) h'0080 0472 dma6 software request generation register 9-12 (dm6sri) h'0080 0474 dma7 software request generation register 9-12 (dm7sri) h'0080 0476 dma8 software request generation register 9-12 (dm8sri) h'0080 0478 dma9 software request generation register 9-12 (dm9sri) (use inhibited area) h'0080 0700 p0 data register p1 data register 8-7 (p0data) (p1data) h'0080 0702 p2 data register p3 data register 8-7 (p2data) (p3data) h'0080 0704 p4 data register (use inhibited area) 8-7 (p4data) h'0080 0706 p6 data register p7 data register 8-7 (p6data) (p7data) h'0080 0708 p8 data register p9 data register 8-7 (p8data) (p9data) h'0080 070a p10 data register p11 data register 8-7 (p10data) (p11data) h'0080 070c p12 data register p13 data register 8-7 (p12data) (p13data) h'0080 070e (use inhibited area) p15 data register 8-7 (p15data) h'0080 0710 (use inhibited area) p17 data register 8-7 (p17data) h'0080 0712 (use inhibited area) (use inhibited area) h'0080 0714 (use inhibited area) (use inhibited area) h'0080 0716 p22 data register (use inhibited area) 8-7 (p22data) (use inhibited area) h'0080 0720 p0 direction register p1 direction register 8-8 (p0dir) (p1dir) h'0080 0722 p2 direction register p3 direction register 8-8 (p2dir) (p3dir) h'0080 0724 p4 direction register (use inhibited area) 8-8 (p4dir) h'0080 0726 p6 direction register p7 direction register 8-8 (p6dir) (p7dir) h'0080 0728 p8 direction register p9 direction register 8-8 (p8dir) (p9dir) h'0080 072a p10 direction register p11 direction register 8-8 (p10dir) (p11dir) h'0080 072c p12 direction register p13 direction register 8-8 (p12dir) (p13dir) h'0080 072e (use inhibited area) p15 direction register 8-8 (p15dir) h'0080 0730 (use inhibited area) p17 direction register 8-8 (p17dir) h'0080 0732 (use inhibited area) (use inhibited area) h'0080 0734 (use inhibited area) (use inhibited area) | | |
3 3-21 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0736 p22 direction register (use inhibited area) 8-8 (p22dir) (use inhibited area) h'0080 0744 (use inhibited area) port input special function control register 8-15 (picnt) 18-3 h'0080 0746 (use inhibited area) p7 operation mode register 8-9, 15-4 (p7mod) 18-7 h'0080 0748 p8 operation mode register p9 operation mode register 8-9 (p8mod) (p9mod) 8-10 h'0080 074a p10 operation mode register p11 operation mode register 8-10 (p10mod) (p11mod) 8-11 h'0080 074c p12 operation mode register p13 operation mode register 8-11 (p12mod) (p13mod) 8-12 h'0080 074e (use inhibited area) p15 operation mode register 8-12 (p15mod) h'0080 0750 (use inhibited area) p17 operation mode register 8-13 (p17mod) h'0080 0752 (use inhibited area) (use inhibited area) h'0080 0754 (use inhibited area) (use inhibited area) h'0080 0756 p22 operation mode register (use inhibited area) 8-13 (p22mod) (use inhibited area) h'0080 0760 port group 0, 1 input level setting register port group 3 input level setting register 8-18 (pg01lev) (pg3lev) h'0080 0762 port group 4, 5 input level setting register port group 6, 7 input level setting register 8-18 (pg45lev) (pg67lev) h'0080 0764 port group 8 input level setting register (use inhibited area) 8-18 (pg8lev) h'0080 0766 (use inhibited area) p7 peripheral function select register 8-14 (p7smod) (use inhibited area) h'0080 077a (use inhibited area) rtd write function disable register 14-3 (wrrdis) (use inhibited area) h'0080 077e (use inhibited area) bus mode control register 15-5 (busmodc) (use inhibited area) h'0080 0786 clock control register (use inhibited area) 18-5 (clkcr) (use inhibited area) h'0080 07e0 flash mode register flash status register 6-7 (fmod) (fstat) 6-8 h'0080 07e2 flash control register 1 flash control register 2 6-9 (fcnt1) (fcnt2) 6-10 h'0080 07e4 flash control register 3 flash control register 4 6-11 (fcnt3) (fcnt4) 6-13 h'0080 07e6 (use inhibited area) h'0080 07e8 virtual flash l bank register 0 6-15 (felbank0) h'0080 07ea virtual flash l bank register 1 6-15 (felbank1) (use inhibited area) h'0080 07f0 virtual flash s bank register 0 6-16 (fesbank0) h'0080 07f2 virtual flash s bank register 1 6-16 (fesbank1) (use inhibited area) h'0080 0fe0 tml1 counter (upper) 10-113 (tml1cth) sfr area register map (11/22) | | | | | | | |
3 3-22 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (12/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0fe2 tml1 counter (lower) 10-113 (tml1ctl) (use inhibited area) h'0080 0fea (use inhibited area) tml1 control register 10-112 (tml1cr) (use inhibited area) h'0080 0ff0 tml1 measure 3 register (upper) 10-115 (tml1mr3h) h'0080 0ff2 tml1 measure 3 register (lower) 10-115 (tml1mr3l) h'0080 0ff4 tml1 measure 2 register (upper) 10-115 (tml1mr2h) h'0080 0ff6 tml1 measure 2 register (lower) 10-115 (tml1mr2l) h'0080 0ff8 tml1 measure 1 register (upper) 10-115 (tml1mr1h) h'0080 0ffa tml1 measure 1 register (lower) 10-115 (tml1mr1l) h'0080 0ffc tml1 measure 0 register (upper) 10-115 (tml1mr0h) h'0080 0ffe tml1 measure 0 register (lower) 10-115 (tml1mr0l) (use inhibited area) h'0080 1000 can0 control register 13-15 (can0cnt) h'0080 1002 can0 status register 13-18 (can0stat) h'0080 1004 can0 extended id register 13-21 (can0extid) h'0080 1006 can0 configuration register 13-22 (can0conf) h'0080 1008 can0 timestamp count register 13-24 (can0tstmp) h'0080 100a can0 receive error count register can0 transmit error count register 13-25 (can0rec) (can0tec) h'0080 100c can0 slot interrupt request status register 13-29 (can0slist) h'0080 100e (use inhibited area) h'0080 1010 can0 slot interrupt request mask register 13-30 (can0slimk) h'0080 1012 (use inhibited area) h'0080 1014 can0 error interrupt request status register can 0 error interrupt request mask register 13-31 (can0erist) (can0erimk) 13-32 h'0080 1016 can0 baud rate prescaler can0 cause of error register 13-26 (can0brp) (can0ef) 13-45 h'0080 1018 can0 mode register can0 dma transfer request select register 13-47 (can0mod) (can0dmarq) 13-48 (use inhibited area) h'0080 1028 can0 global mask register standard id 0 can0 global mask register standard id 1 13-49 (c0gmsks0) (c0gmsks1) h'0080 102a can0 global mask register extended id 0 can0 global mask register extended id 1 13-50 (c0gmske0) (c0gmske1) h'0080 102c can0 global mask register extended id 2 (use inhibited area) 13-51 (c0gmske2) h'0080 102e (use inhibited area) h'0080 1030 can0 local mask register a standard id 0 can0 local mask register a standard id 1 13-49 (c0lmskas0) (c0lmskas1) h'0080 1032 can0 local mask register a extended id 0 can0 local mask register a extended id 1 13-50 (c0lmskae0) (c0lmskae1) h'0080 1034 can0 local mask register a extended id 2 (use inhibited area) 13-51 (c0lmskae2) h'0080 1036 (use inhibited area) | | | |
3 3-23 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (13/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 1038 can0 local mask register b standard id 0 can0 local mask register b standard id 1 13-49 (c0lmskbs0) (c0lmskbs1) h'0080 103a can0 local mask register b extended id 0 can0 local mask register b extended id 1 13-50 (c0lmskbe0) (c0lmskbe1) h'0080 103c can0 local mask register b extended id 2 (use inhibited area) 13-51 (c0lmskbe2) h'0080 103e (use inhibited area) h'0080 1040 can0 single shot mode control register 13-53 (can0ssmode) h'0080 1042 (use inhibited area) h'0080 1044 can0 single-shot interrupt request status register 13-33 (can0ssist) h'0080 1046 (use inhibited area) h'0080 1048 can0 single-shot interrupt request mask register 13-34 (can0ssimk) (use inhibited area) h'0080 1050 can0 message slot 0 control register can0 message slot 1 control register 13-54 (c0msl0cnt) (c0msl1cnt) h'0080 1052 can0 message slot 2 control register can0 message slot 3 control register 13-54 (c0msl2cnt) (c0msl3cnt) h'0080 1054 can0 message slot 4 control register can0 message slot 5 control register 13-54 (c0msl4cnt) (c0msl5cnt) h'0080 1056 can0 message slot 6 control register can0 message slot 7 control register 13-54 (c0msl6cnt) (c0msl7cnt) h'0080 1058 can0 message slot 8 control register can0 message slot 9 control register 13-54 (c0msl8cnt) (c0msl9cnt) h'0080 105a can0 message slot 10 control register can0 message slot 11 control register 13-54 (c0msl10cnt) (c0msl11cnt) h'0080 105c can0 message slot 12 control register can0 message slot 13 control register 13-54 (c0msl12cnt) (c0msl13cnt) h'0080 105e can0 message slot 14 control register can0 message slot 15 control register 13-54 (c0msl14cnt) (c0msl15cnt) (use inhibited area) h'0080 1100 can0 message slot 0 standard id 0 can0 message slot 0 standard id 1 13-58 (c0msl0sid0) (c0msl0sid1) 13-59 h'0080 1102 can0 message slot 0 extended id 0 can0 message slot 0 extended id 1 13-60 (c0msl0eid0) (c0msl0eid1) 13-61 h'0080 1104 can0 message slot 0 extended id 2 can0 message slot 0 data length register 13-62 (c0msl0eid2) (c0msl0dlc) 13-63 h'0080 1106 can0 message slot 0 data 0 can0 message slot 0 data 1 13-64 (c0msl0dt0) (c0msl0dt1) 13-65 h'0080 1108 can0 message slot 0 data 2 can0 message slot 0 data 3 13-66 (c0msl0dt2) (c0msl0dt3) 13-67 h'0080 110a can0 message slot 0 data 4 can0 message slot 0 data 5 13-68 (c0msl0dt4) (c0msl0dt5) 13-69 h'0080 110c can0 message slot 0 data 6 can0 message slot 0 data 7 13-70 (c0msl0dt6) (c0msl0dt7) 13-71 h'0080 110e can0 message slot 0 timestamp 13-72 (c0msl0tsp) h'0080 1110 can0 message slot 1 standard id 0 can0 message slot 1 standard id 1 13-58 (c0msl1sid0) (c0msl1sid1) 13-59 h'0080 1112 can0 message slot 1 extended id 0 can0 message slot 1 extended id 1 13-60 (c0msl1eid0) (c0msl1eid1) 13-61 h'0080 1114 can0 message slot 1 extended id 2 can0 message slot 1 data length register 13-62 (c0msl1eid2) (c0msl1dlc) 13-63 h'0080 1116 can0 message slot 1 data 0 can0 message slot 1 data 1 13-64 (c0msl1dt0) (c0msl1dt1) 13-65 h'0080 1118 can0 message slot 1 data 2 can0 message slot 1 data 3 13-66 (c0msl1dt2) (c0msl1dt3) 13-67 h'0080 111a can0 message slot 1 data 4 can0 message slot 1 data 5 13-68 (c0msl1dt4) (c0msl1dt5) 13-69 h'0080 111c can0 message slot 1 data 6 can0 message slot 1 data 7 13-70 (c0msl1dt6) (c0msl1dt7) 13-71 h'0080 111e can0 message slot 1 timestamp 13-72 (c0msl1tsp) | |
3 3-24 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (14/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 1120 can0 message slot 2 standard id 0 can0 message slot 2 standard id 1 13-58 (c0msl2sid0) (c0msl2sid1) 13-59 h'0080 1122 can0 message slot 2 extended id 0 can0 message slot 2 extended id 1 13-60 (c0msl2eid0) (c0msl2eid1) 13-61 h'0080 1124 can0 message slot 2 extended id 2 can0 message slot 2 data length register 13-62 (c0msl2eid2) (c0msl2dlc) 13-63 h'0080 1126 can0 message slot 2 data 0 can0 message slot 2 data 1 13-64 (c0msl2dt0) (c0msl2dt1) 13-65 h'0080 1128 can0 message slot 2 data 2 can0 message slot 2 data 3 13-66 (c0msl2dt2) (c0msl2dt3) 13-67 h'0080 112a can0 message slot 2 data 4 can0 message slot 2 data 5 13-68 (c0msl2dt4) (c0msl2dt5) 13-69 h'0080 112c can0 message slot 2 data 6 can0 message slot 2 data 7 13-70 (c0msl2dt6) (c0msl2dt7) 13-71 h'0080 112e can0 message slot 2 timestamp 13-72 (c0msl2tsp) h'0080 1130 can0 message slot 3 standard id 0 can0 message slot 3 standard id 1 13-58 (c0msl3sid0) (c0msl3sid1) 13-59 h'0080 1132 can0 message slot 3 extended id 0 can0 message slot 3 extended id 1 13-60 (c0msl3eid0) (c0msl3eid1) 13-61 h'0080 1134 can0 message slot 3 extended id 2 can0 message slot 3 data length register 13-62 (c0msl3eid2) (c0msl3dlc) 13-63 h'0080 1136 can0 message slot 3 data 0 can0 message slot 3 data 1 13-64 (c0msl3dt0) (c0msl3dt1) 13-65 h'0080 1138 can0 message slot 3 data 2 can0 message slot 3 data 3 13-66 (c0msl3dt2) (c0msl3dt3) 13-67 h'0080 113a can0 message slot 3 data 4 can0 message slot 3 data 5 13-68 (c0msl3dt4) (c0msl3dt5) 13-69 h'0080 113c can0 message slot 3 data 6 can0 message slot 3 data 7 13-70 (c0msl3dt6) (c0msl3dt7) 13-71 h'0080 113e can0 message slot 3 timestamp 13-72 (c0msl3tsp) h'0080 1140 can0 message slot 4 standard id 0 can0 message slot 4 standard id 1 13-58 (c0msl4sid0) (c0msl4sid1) 13-59 h'0080 1142 can0 message slot 4 extended id 0 can0 message slot 4 extended id 1 13-60 (c0msl4eid0) (c0msl4eid1) 13-61 h'0080 1144 can0 message slot 4 extended id 2 can0 message slot 4 data length register 13-62 (c0msl4eid2) (c0msl4dlc) 13-63 h'0080 1146 can0 message slot 4 data 0 can0 message slot 4 data 1 13-64 (c0msl4dt0) (c0msl4dt1) 13-65 h'0080 1148 can0 message slot 4 data 2 can0 message slot 4 data 3 13-66 (c0msl4dt2) (c0msl4dt3) 13-67 h'0080 114a can0 message slot 4 data 4 can0 message slot 4 data 5 13-68 (c0msl4dt4) (c0msl4dt5) 13-69 h'0080 114c can0 message slot 4 data 6 can0 message slot 4 data 7 13-70 (c0msl4dt6) (c0msl4dt7) 13-71 h'0080 114e can0 message slot 4 timestamp 13-72 (c0msl4tsp) h'0080 1150 can0 message slot 5 standard id 0 can0 message slot 5 standard id 1 13-58 (c0msl5sid0) (c0msl5sid1) 13-59 h'0080 1152 can0 message slot 5 extended id 0 can0 message slot 5 extended id 1 13-60 (c0msl5eid0) (c0msl5eid1) 13-61 h'0080 1154 can0 message slot 5 extended id 2 can0 message slot 5 data length register 13-62 (c0msl5eid2) (c0msl5dlc) 13-63 h'0080 1156 can0 message slot 5 data 0 can0 message slot 5 data 1 13-64 (c0msl5dt0) (c0msl5dt1) 13-65 h'0080 1158 can0 message slot 5 data 2 can0 message slot 5 data 3 13-66 (c0msl5dt2) (c0msl5dt3) 13-67 h'0080 115a can0 message slot 5 data 4 can0 message slot 5 data 5 13-68 (c0msl5dt4) (c0msl5dt5) 13-69 h'0080 115c can0 message slot 5 data 6 can0 message slot 5 data 7 13-70 (c0msl5dt6) (c0msl5dt7) 13-71 h'0080 115e can0 message slot 5 timestamp 13-72 (c0msl5tsp)
3 3-25 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (15/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 1160 can0 message slot 6 standard id 0 can0 message slot 6 standard id 1 13-58 (c0msl6sid0) (c0msl6sid1) 13-59 h'0080 1162 can0 message slot 6 extended id 0 can0 message slot 6 extended id 1 13-60 (c0msl6eid0) (c0msl6eid1) 13-61 h'0080 1164 can0 message slot 6 extended id 2 can0 message slot 6 data length register 13-62 (c0msl6eid2) (c0msl6dlc) 13-63 h'0080 1166 can0 message slot 6 data 0 can0 message slot 6 data 1 13-64 (c0msl6dt0) (c0msl6dt1) 13-65 h'0080 1168 can0 message slot 6 data 2 can0 message slot 6 data 3 13-66 (c0msl6dt2) (c0msl6dt3) 13-67 h'0080 116a can0 message slot 6 data 4 can0 message slot 6 data 5 13-68 (c0msl6dt4) (c0msl6dt5) 13-69 h'0080 116c can0 message slot 6 data 6 can0 message slot 6 data 7 13-70 (c0msl6dt6) (c0msl6dt7) 13-71 h'0080 116e can0 message slot 6 timestamp 13-72 (c0msl6tsp) h'0080 1170 can0 message slot 7 standard id 0 can0 message slot 7 standard id 1 13-58 (c0msl7sid0) (c0msl7sid1) 13-59 h'0080 1172 can0 message slot 7 extended id 0 can0 message slot 7 extended id 1 13-60 (c0msl7eid0) (c0msl7eid1) 13-61 h'0080 1174 can0 message slot 7 extended id 2 can0 message slot 7 data length register 13-62 (c0msl7eid2) (c0msl7dlc) 13-63 h'0080 1176 can0 message slot 7 data 0 can0 message slot 7 data 1 13-64 (c0msl7dt0) (c0msl7dt1) 13-65 h'0080 1178 can0 message slot 7 data 2 can0 message slot 7 data 3 13-66 (c0msl7dt2) (c0msl7dt3) 13-67 h'0080 117a can0 message slot 7 data 4 can0 message slot 7 data 5 13-68 (c0msl7dt4) (c0msl7dt5) 13-69 h'0080 117c can0 message slot 7 data 6 can0 message slot 7 data 7 13-70 (c0msl7dt6) (c0msl7dt7) 13-71 h'0080 117e can0 message slot 7 timestamp 13-72 (c0msl7tsp) h'0080 1180 can0 message slot 8 standard id 0 can0 message slot 8 standard id 1 13-58 (c0msl8sid0) (c0msl8sid1) 13-59 h'0080 1182 can0 message slot 8 extended id 0 can0 message slot 8 extended id 1 13-60 (c0msl8eid0) (c0msl8eid1) 13-61 h'0080 1184 can0 message slot 8 extended id 2 can0 message slot 8 data length register 13-62 (c0msl8eid2) (c0msl8dlc) 13-63 h'0080 1186 can0 message slot 8 data 0 can0 message slot 8 data 1 13-64 (c0msl8dt0) (c0msl8dt1) 13-65 h'0080 1188 can0 message slot 8 data 2 can0 message slot 8 data 3 13-66 (c0msl8dt2) (c0msl8dt3) 13-67 h'0080 118a can0 message slot 8 data 4 can0 message slot 8 data 5 13-68 (c0msl8dt4) (c0msl8dt5) 13-69 h'0080 118c can0 message slot 8 data 6 can0 message slot 8 data 7 13-70 (c0msl8dt6) (c0msl8dt7) 13-71 h'0080 118e can0 message slot 8 timestamp 13-72 (c0msl8tsp) h'0080 1190 can0 message slot 9 standard id 0 can0 message slot 9 standard id 1 13-58 (c0msl9sid0) (c0msl9sid1) 13-59 h'0080 1192 can0 message slot 9 extended id 0 can0 message slot 9 extended id 1 13-60 (c0msl9eid0) (c0msl9eid1) 13-61 h'0080 1194 can0 message slot 9 extended id 2 can0 message slot 9 data length register 13-62 (c0msl9eid2) (c0msl9dlc) 13-63 h'0080 1196 can0 message slot 9 data 0 can0 message slot 9 data 1 13-64 (c0msl9dt0) (c0msl9dt1) 13-65 h'0080 1198 can0 message slot 9 data 2 can0 message slot 9 data 3 13-66 (c0msl9dt2) (c0msl9dt3) 13-67 h'0080 119a can0 message slot 9 data 4 can0 message slot 9 data 5 13-68 (c0msl9dt4) (c0msl9dt5) 13-69 h'0080 119c can0 message slot 9 data 6 can0 message slot 9 data 7 13-70 (c0msl9dt6) (c0msl9dt7) 13-71 h'0080 119e can0 message slot 9 timestamp 13-72 (c0msl9tsp)
3 3-26 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (16/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 11a0 can0 message slot 10 standard id 0 can0 message slot 10 standard id 1 13-58 (c0msl10sid0) (c0msl10sid1) 13-59 h'0080 11a2 can0 message slot 10 extended id 0 can0 message slot 10 extended id 1 13-60 (c0msl10eid0) (c0msl10eid1) 13-61 h'0080 11a4 can0 message slot 10 extended id 2 can0 message slot 10 data length register 13-62 (c0msl10eid2) (c0msl10dlc) 13-63 h'0080 11a6 can0 message slot 10 data 0 can0 message slot 10 data 1 13-64 (c0msl10dt0) (c0msl10dt1) 13-65 h'0080 11a8 can0 message slot 10 data 2 can0 message slot 10 data 3 13-66 (c0msl10dt2) (c0msl10dt3) 13-67 h'0080 11aa can0 message slot 10 data 4 can0 message slot 10 data 5 13-68 (c0msl10dt4) (c0msl10dt5) 13-69 h'0080 11ac can0 message slot 10 data 6 can0 message slot 10 data 7 13-70 (c0msl10dt6) (c0msl10dt7) 13-71 h'0080 11ae can0 message slot 10 timestamp 13-72 (c0msl10tsp) h'0080 11b0 can0 message slot 11 standard id 0 can0 message slot 11 standard id 1 13-58 (c0msl11sid0) (c0msl11sid1) 13-59 h'0080 11b2 can0 message slot 11 extended id 0 can0 message slot 11 extended id 1 13-60 (c0msl11eid0) (c0msl11eid1) 13-61 h'0080 11b4 can0 message slot 11 extended id 2 can0 message slot 11 data length register 13-62 (c0msl11eid2) (c0msl11dlc) 13-63 h'0080 11b6 can0 message slot 11 data 0 can0 message slot 11 data 1 13-64 (c0msl11dt0) (c0msl11dt1) 13-65 h'0080 11b8 can0 message slot 11 data 2 can0 message slot 11 data 3 13-66 (c0msl11dt2) (c0msl11dt3) 13-67 h'0080 11ba can0 message slot 11 data 4 can0 message slot 11 data 5 13-68 (c0msl11dt4) (c0msl11dt5) 13-69 h'0080 11bc can0 message slot 11 data 6 can0 message slot 11 data 7 13-70 (c0msl11dt6) (c0msl11dt7) 13-71 h'0080 11be can0 message slot 11 timestamp 13-72 (c0msl11tsp) h'0080 11c0 can0 message slot 12 standard id 0 can0 message slot 12 standard id 1 13-58 (c0msl12sid0) (c0msl12sid1) 13-59 h'0080 11c2 can0 message slot 12 extended id 0 can0 message slot 12 extended id 1 13-60 (c0msl12eid0) (c0msl12eid1) 13-61 h'0080 11c4 can0 message slot 12 extended id 2 can0 message slot 12 data length register 13-62 (c0msl12eid2) (c0msl12dlc) 13-63 h'0080 11c6 can0 message slot 12 data 0 can0 message slot 12 data 1 13-64 (c0msl12dt0) (c0msl12dt1) 13-65 h'0080 11c8 can0 message slot 12 data 2 can0 message slot 12 data 3 13-66 (c0msl12dt2) (c0msl12dt3) 13-67 h'0080 11ca can0 message slot 12 data 4 can0 message slot 12 data 5 13-68 (c0msl12dt4) (c0msl12dt5) 13-69 h'0080 11cc can0 message slot 12 data 6 can0 message slot 12 data 7 13-70 (c0msl12dt6) (c0msl12dt7) 13-71 h'0080 11ce can0 message slot 12 timestamp 13-72 (c0msl12tsp) h'0080 11d0 can0 message slot 13 standard id 0 can0 message slot 13 standard id 1 13-58 (c0msl13sid0) (c0msl13sid1) 13-59 h'0080 11d2 can0 message slot 13 extended id 0 can0 message slot 13 extended id 1 13-60 (c0msl13eid0) (c0msl13eid1) 13-61 h'0080 11d4 can0 message slot 13 extended id 2 can0 message slot 13 data length register 13-62 (c0msl13eid2) (c0msl13dlc) 13-63 h'0080 11d6 can0 message slot 13 data 0 can0 message slot 13 data 1 13-64 (c0msl13dt0) (c0msl13dt1) 13-65 h'0080 11d8 can0 message slot 13 data 2 can0 message slot 13 data 3 13-66 (c0msl13dt2) (c0msl13dt3) 13-67 h'0080 11da can0 message slot 13 data 4 can0 message slot 13 data 5 13-68 (c0msl13dt4) (c0msl13dt5) 13-69 h'0080 11dc can0 message slot 13 data 6 can0 message slot 13 data 7 13-70 (c0msl13dt6) (c0msl13dt7) 13-71 h'0080 11de can0 message slot 13 timestamp 13-72 (c0msl13tsp)
3 3-27 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (17/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 11e0 can0 message slot 14 standard id 0 can0 message slot 14 standard id 1 13-58 (c0msl14sid0) (c0msl14sid1) 13-59 h'0080 11e2 can0 message slot 14 extended id 0 can0 message slot 14 extended id 1 13-60 (c0msl14eid0) (c0msl14eid1) 13-61 h'0080 11e4 can0 message slot 14 extended id 2 can0 message slot 14 data length register 13-62 (c0msl14eid2) (c0msl14dlc) 13-63 h'0080 11e6 can0 message slot 14 data 0 can0 message slot 14 data 1 13-64 (c0msl14dt0) (c0msl14dt1) 13-65 h'0080 11e8 can0 message slot 14 data 2 can0 message slot 14 data 3 13-66 (c0msl14dt2) (c0msl14dt3) 13-67 h'0080 11ea can0 message slot 14 data 4 can0 message slot 14 data 5 13-68 (c0msl14dt4) (c0msl14dt5) 13-69 h'0080 11ec can0 message slot 14 data 6 can0 message slot 14 data 7 13-70 (c0msl14dt6) (c0msl14dt7) 13-71 h'0080 11ee can0 message slot 14 timestamp 13-72 (c0msl14tsp) h'0080 11f0 can0 message slot 15 standard id 0 can0 message slot 15 standard id 1 13-58 (c0msl15sid0) (c0msl15sid1) 13-59 h'0080 11f2 can0 message slot 15 extended id 0 can0 message slot 15 extended id 1 13-60 (c0msl15eid0) (c0msl15eid1) 13-61 h'0080 11f4 can0 message slot 15 extended id 2 can0 message slot 15 data length register 13-62 (c0msl15eid2) (c0msl15dlc) 13-63 h'0080 11f6 can0 message slot 15 data 0 can0 message slot 15 data 1 13-64 (c0msl15dt0) (c0msl15dt1) 13-65 h'0080 11f8 can0 message slot 15 data 2 can0 message slot 15 data 3 13-66 (c0msl15dt2) (c0msl15dt3) 13-67 h'0080 11fa can0 message slot 15 data 4 can0 message slot 15 data 5 13-68 (c0msl15dt4) (c0msl15dt5) 13-69 h'0080 11fc can0 message slot 15 data 6 can0 message slot 15 data 7 13-70 (c0msl15dt6) (c0msl15dt7) 13-71 h'0080 11fe can0 message slot 15 timestamp 13-72 (c0msl15tsp) (use inhibited area) h'0080 1400 can1 control register 13-15 (can1cnt) h'0080 1402 can1 status register 13-18 (can1stat) h'0080 1404 can1 extended id register 13-21 (can1extid) h'0080 1406 can1 configuration register 13-22 (can1conf) h'0080 1408 can1 timestamp count register 13-24 (can1tstmp) h'0080 140a can1 receive error count register can1 transmit error count register 13-25 (can1rec) (can1tec) h'0080 140c can1 slot interrupt request status register 13-29 (can1slist) h'0080 140e (use inhibited area) h'0080 1410 can1 slot interrupt request mask register 13-30 (can1slimk) h'0080 1412 (use inhibited area) h'0080 1414 can1 error interrupt request status register can1 e rror interrupt request mask register 13-31 (can1erist) (can1erimk) 13-32 h'0080 1416 can1 baud rate prescaler can1 cause of error register 13-26 (can1brp) (can1ef) 13-45 h'0080 1418 can1 mode register can1 dma transfer request select register 13-47 (can1mod) (can1dmarq) 13-48 (use inhibited area) h'0080 1428 can1 global mask register standard id 0 can1 global mask register standard id 1 13-49 (c1gmsks0) (c1gmsks1) h'0080 142a can1 global mask register extended id 0 can1 global mask register extended id 1 13-50 (c1gmske0) (c1gmske1) h'0080 142c can1 global mask register extended id 2 (use inhibited area) 13-51 (c1gmske2) h'0080 142e (use inhibited area) | | |
3 3-28 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (18/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 1430 can1 local mask register a standard id 0 can1 local mask register a standard id 1 13-49 (c1lmskas0) (c1lmskas1) h'0080 1432 can1 local mask register a extended id 0 can1 local mask register a extended id 1 13-50 (c1lmskae0) (c1lmskae1) h'0080 1434 can1 local mask register a extended id 2 (use inhibited area) 13-51 (c1lmskae2) h'0080 1436 (use inhibited area) h'0080 1438 can1 local mask register b standard id 0 can1 local mask register b standard id 1 13-49 (c1lmskbs0) (c1lmskbs1) h'0080 143a can1 local mask register b extended id 0 can1 local mask register b extended id 1 13-50 (c1lmskbe0) (c1lmskbe1) h'0080 143c can1 local mask register b extended id 2 (use inhibited area) 13-51 (c1lmskbe2) h'0080 143e (use inhibited area) h'0080 1440 can1 single-shot mode control register 13-53 (can1ssmode) h'0080 1442 (use inhibited area) h'0080 1444 can1 single-shot interrupt request status register 13-33 (can1ssist) h'0080 1446 (use inhibited area) h'0080 1448 can1 single-shot interrupt request mask register 13-34 (can1ssimk) (use inhibited area) h'0080 1450 can1 message slot 0 control register can1 message slot 1 control register 13-54 (c1msl0cnt) (c1msl1cnt) h'0080 1452 can1 message slot 2 control register can1 message slot 3 control register 13-54 (c1msl2cnt) (c1msl3cnt) h'0080 1454 can1 message slot 4 control register can1 message slot 5 control register 13-54 (c1msl4cnt) (c1msl5cnt) h'0080 1456 can1 message slot 6 control register can1 message slot 7 control register 13-54 (c1msl6cnt) (c1msl7cnt) h'0080 1458 can1 message slot 8 control register can1 message slot 9 control register 13-54 (c1msl8cnt) (c1msl9cnt) h'0080 145a can1 message slot 10 control register can1 message slot 11 control register 13-54 (c1msl10cnt) (c1msl11cnt) h'0080 145c can1 message slot 12 control register can1 message slot 13 control register 13-54 (c1msl12cnt) (c1msl13cnt) h'0080 145e can1 message slot 14 control register can1 message slot 15 control register 13-54 (c1msl14cnt) (c1msl15cnt) (use inhibited area) h'0080 1500 can1 message slot 0 standard id 0 can1 message slot 0 standard id 1 13-58 (c1msl0sid0) (c1msl0sid1) 13-59 h'0080 1502 can1 message slot 0 extended id 0 can1 message slot 0 extended id 1 13-60 (c1msl0eid0) (c1msl0eid1) 13-61 h'0080 1504 can1 message slot 0 extended id 2 can1 message slot 0 data length register 13-62 (c1msl0eid2) (c1msl0dlc) 13-63 h'0080 1506 can1 message slot 0 data 0 can1 message slot 0 data 1 13-64 (c1msl0dt0) (c1msl0dt1) 13-65 h'0080 1508 can1 message slot 0 data 2 can1 message slot 0 data 3 13-66 (c1msl0dt2) (c1msl0dt3) 13-67 h'0080 150a can1 message slot 0 data 4 can1 message slot 0 data 5 13-68 (c1msl0dt4) (c1msl0dt5) 13-69 h'0080 150c can1 message slot 0 data 6 can1 message slot 0 data 7 13-70 (c1msl0dt6) (c1msl0dt7) 13-71 h'0080 150e can1 message slot 0 timestamp 13-72 (c1msl0tsp) | |
3 3-29 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (19/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 1510 can1 message slot 1 standard id 0 can1 message slot 1 standard id 1 13-58 (c1msl1sid0) (c1msl1sid1) 13-59 h'0080 1512 can1 message slot 1 extended id 0 can1 message slot 1 extended id 1 13-60 (c1msl1eid0) (c1msl1eid1) 13-61 h'0080 1514 can1 message slot 1 extended id 2 can1 message slot 1 data length register 13-62 (c1msl1eid2) (c1msl1dlc) 13-63 h'0080 1516 can1 message slot 1 data 0 can1 message slot 1 data 1 13-64 (c1msl1dt0) (c1msl1dt1) 13-65 h'0080 1518 can1 message slot 1 data 2 can1 message slot 1 data 3 13-66 (c1msl1dt2) (c1msl1dt3) 13-67 h'0080 151a can1 message slot 1 data 4 can1 message slot 1 data 5 13-68 (c1msl1dt4) (c1msl1dt5) 13-69 h'0080 151c can1 message slot 1 data 6 can1 message slot 1 data 7 13-70 (c1msl1dt6) (c1msl1dt7) 13-71 h'0080 151e can1 message slot 1 timestamp 13-72 (c1msl1tsp) h'0080 1520 can1 message slot 2 standard id 0 can1 message slot 2 standard id 1 13-58 (c1msl2sid0) (c1msl2sid1) 13-59 h'0080 1522 can1 message slot 2 extended id 0 can1 message slot 2 extended id 1 13-60 (c1msl2eid0) (c1msl2eid1) 13-61 h'0080 1524 can1 message slot 2 extended id 2 can1 message slot 2 data length register 13-62 (c1msl2eid2) (c1msl2dlc) 13-63 h'0080 1526 can1 message slot 2 data 0 can1 message slot 2 data 1 13-64 (c1msl2dt0) (c1msl2dt1) 13-65 h'0080 1528 can1 message slot 2 data 2 can1 message slot 2 data 3 13-66 (c1msl2dt2) (c1msl2dt3) 13-67 h'0080 152a can1 message slot 2 data 4 can1 message slot 2 data 5 13-68 (c1msl2dt4) (c1msl2dt5) 13-69 h'0080 152c can1 message slot 2 data 6 can1 message slot 2 data 7 13-70 (c1msl2dt6) (c1msl2dt7) 13-71 h'0080 152e can1 message slot 2 timestamp 13-72 (c1msl2tsp) h'0080 1530 can1 message slot 3 standard id 0 can1 message slot 3 standard id 1 13-58 (c1msl3sid0) (c1msl3sid1) 13-59 h'0080 1532 can1 message slot 3 extended id 0 can1 message slot 3 extended id 1 13-60 (c1msl3eid0) (c1msl3eid1) 13-61 h'0080 1534 can1 message slot 3 extended id 2 can1 message slot 3 data length register 13-62 (c1msl3eid2) (c1msl3dlc) 13-63 h'0080 1536 can1 message slot 3 standard id 0 can1 message slot 3 standard id 1 13-64 (c1msl3dt0) (c1msl3dt1) 13-65 h'0080 1538 can1 message slot 3 data 2 can1 message slot 3 data 3 13-66 (c1msl3dt2) (c1msl3dt3) 13-67 h'0080 153a can1 message slot 3 data 4 can1 message slot 3 data 5 13-68 (c1msl3dt4) (c1msl3dt5) 13-69 h'0080 153c can1 message slot 3 data 6 can1 message slot 3 data 7 13-70 (c1msl3dt6) (c1msl3dt7) 13-71 h'0080 153e can1 message slot 3 timestamp 13-72 (c1msl3tsp) h'0080 1540 can1 message slot 4 standard id 0 can1 message slot 4 standard id 1 13-58 (c1msl4sid0) (c1msl4sid1) 13-59 h'0080 1542 can1 message slot 4 extended id 0 can1 message slot 4 extended id 1 13-60 (c1msl4eid0) (c1msl4eid1) 13-61 h'0080 1544 can1 message slot 4 extended id 2 can1 message slot 4 data length register 13-62 (c1msl4eid2) (c1msl4dlc) 13-63 h'0080 1546 can1 message slot 4 data 0 can1 message slot 4 data 1 13-64 (c1msl4dt0) (c1msl4dt1) 13-65 h'0080 1548 can1 message slot 4 data 2 can1 message slot 4 data 3 13-66 (c1msl4dt2) (c1msl4dt3) 13-67 h'0080 154a can1 message slot 4 data 4 can1 message slot 4 data 5 13-68 (c1msl4dt4) (c1msl4dt5) 13-69 h'0080 154c can1 message slot 4 data 6 can1 message slot 4 data 7 13-70 (c1msl4dt6) (c1msl4dt7) 13-71 h'0080 154e can1 message slot 4 timestamp 13-72 (c1msl4tsp)
3 3-30 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (20/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 1550 can1 message slot 5 standard id 0 can1 message slot 5 standard id 1 13-58 (c1msl5sid0) (c1msl5sid1) 13-59 h'0080 1552 can1 message slot 5 extended id 0 can1 message slot 5 extended id 1 13-60 (c1msl5eid0) (c1msl5eid1) 13-61 h'0080 1554 can1 message slot 5 extended id 2 can1 message slot 5 data length register 13-62 (c1msl5eid2) (c1msl5dlc) 13-63 h'0080 1556 can1 message slot 5 data 0 can1 message slot 5 data 1 13-64 (c1msl5dt0) (c1msl5dt1) 13-65 h'0080 1558 can1 message slot 5 data 2 can1 message slot 5 data 3 13-66 (c1msl5dt2) (c1msl5dt3) 13-67 h'0080 155a can1 message slot 5 data 4 can1 message slot 5 data 5 13-68 (c1msl5dt4) (c1msl5dt5) 13-69 h'0080 155c can1 message slot 5 data 6 can1 message slot 5 data 7 13-70 (c1msl5dt6) (c1msl5dt7) 13-71 h'0080 155e can1 message slot 5 timestamp 13-72 (c1msl5tsp) h'0080 1560 can1 message slot 6 standard id 0 can1 message slot 6 standard id 1 13-58 (c1msl6sid0) (c1msl6sid1) 13-59 h'0080 1562 can1 message slot 6 extended id 0 can1 message slot 6 extended id 1 13-60 (c1msl6eid0) (c1msl6eid1) 13-61 h'0080 1564 can1 message slot 6 extended id 2 can1 message slot 6 data length register 13-62 (c1msl6eid2) (c1msl6dlc) 13-63 h'0080 1566 can1 message slot 6 data 0 can1 message slot 6 data 1 13-64 (c1msl6dt0) (c1msl6dt1) 13-65 h'0080 1568 can1 message slot 6 data 2 can1 message slot 6 data 3 13-66 (c1msl6dt2) (c1msl6dt3) 13-67 h'0080 156a can1 message slot 6 data 4 can1 message slot 6 data 5 13-68 (c1msl6dt4) (c1msl6dt5) 13-69 h'0080 156c can1 message slot 6 data 6 can1 message slot 6 data 7 13-70 (c1msl6dt6) (c1msl6dt7) 13-71 h'0080 156e can1 message slot 6 timestamp 13-72 (c1msl6tsp) h'0080 1570 can1 message slot 7 standard id 0 can1 message slot 7 standard id 1 13-58 (c1msl7sid0) (c1msl7sid1) 13-59 h'0080 1572 can1 message slot 7 extended id 0 can1 message slot 7 extended id 1 13-60 (c1msl7eid0) (c1msl7eid1) 13-61 h'0080 1574 can1 message slot 7 extended id 2 can1 message slot 7 data length register 13-62 (c1msl7eid2) (c1msl7dlc) 13-63 h'0080 1576 can1 message slot 7 data 0 can1 message slot 7 data 1 13-64 (c1msl7dt0) (c1msl7dt1) 13-65 h'0080 1578 can1 message slot 7 data 2 can1 message slot 7 data 3 13-66 (c1msl7dt2) (c1msl7dt3) 13-67 h'0080 157a can1 message slot 7 data 4 can1 message slot 7 data 5 13-68 (c1msl7dt4) (c1msl7dt5) 13-69 h'0080 157c can1 message slot 7 data 6 can1 message slot 7 data 7 13-70 (c1msl7dt6) (c1msl7dt7) 13-71 h'0080 157e can1 message slot 7 timestamp 13-72 (c1msl7tsp) h'0080 1580 can1 message slot 8 standard id 0 can1 message slot 8 standard id 1 13-58 (c1msl8sid0) (c1msl8sid1) 13-59 h'0080 1582 can1 message slot 8 extended id 0 can1 message slot 8 extended id 1 13-60 (c1msl8eid0) (c1msl8eid1) 13-61 h'0080 1584 can1 message slot 8 extended id 2 can1 message slot 8 data length register 13-62 (c1msl8eid2) (c1msl8dlc) 13-63 h'0080 1586 can1 message slot 8 data 0 can1 message slot 8 data 1 13-64 (c1msl8dt0) (c1msl8dt1) 13-65 h'0080 1588 can1 message slot 8 data 2 can1 message slot 8 data 3 13-66 (c1msl8dt2) (c1msl8dt3) 13-67 h'0080 158a can1 message slot 8 data 4 can1 message slot 8 data 5 13-68 (c1msl8dt4) (c1msl8dt5) 13-69 h'0080 158c can1 message slot 8 data 6 can1 message slot 8 data 7 13-70 (c1msl8dt6) (c1msl8dt7) 13-71 h'0080 158e can1 message slot 8 timestamp 13-72 (c1msl8tsp)
3 3-31 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (21/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 1590 can1 message slot 9 standard id 0 can1 message slot 9 standard id 1 13-58 (c1msl9sid0) (c1msl9sid1) 13-59 h'0080 1592 can1 message slot 9 extended id 0 can1 message slot 9 extended id 1 13-60 (c1msl9eid0) (c1msl9eid1) 13-61 h'0080 1594 can1 message slot 9 extended id 2 can1 message slot 9 data length register 13-62 (c1msl9eid2) (c1msl9dlc) 13-63 h'0080 1596 can1 message slot 9 data 0 can1 message slot 9 data 1 13-64 (c1msl9dt0) (c1msl9dt1) 13-65 h'0080 1598 can1 message slot 9 data 2 can1 message slot 9 data 3 13-66 (c1msl9dt2) (c1msl9dt3) 13-67 h'0080 159a can1 message slot 9 data 4 can1 message slot 9 data 5 13-68 (c1msl9dt4) (c1msl9dt5) 13-69 h'0080 159c can1 message slot 9 data 6 can1 message slot 9 data 7 13-70 (c1msl9dt6) (c1msl9dt7) 13-71 h'0080 159e can1 message slot 9 timestamp 13-72 (c1msl9tsp) h'0080 15a0 can1 message slot 10 standard id 0 can1 message slot 10 standard id 1 13-58 (c1msl10sid0) (c1msl10sid1) 13-59 h'0080 15a2 can1 message slot 10 extended id 0 can1 message slot 10 extended id 1 13-60 (c1msl10eid0) (c1msl10eid1) 13-61 h'0080 15a4 can1 message slot 10 extended id 2 can1 message slot 10 data length register 13-62 (c1msl10eid2) (c1msl10dlc) 13-63 h'0080 15a6 can1 message slot 10 data 0 can1 message slot 10 data 1 13-64 (c1msl10dt0) (c1msl10dt1) 13-65 h'0080 15a8 can1 message slot 10 data 2 can1 message slot 10 data 3 13-66 (c1msl10dt2) (c1msl10dt3) 13-67 h'0080 15aa can1 message slot 10 data 4 can1 message slot 10 data 5 13-68 (c1msl10dt4) (c1msl10dt5) 13-69 h'0080 15ac can1 message slot 10 data 6 can1 message slot 10 data 7 13-70 (c1msl10dt6) (c1msl10dt7) 13-71 h'0080 15ae can1 message slot 10 timestamp 13-72 (c1msl10tsp) h'0080 15b0 can1 message slot 11 standard id 0 can1 message slot 11 standard id 1 13-58 (c1msl11sid0) (c1msl11sid1) 13-59 h'0080 15b2 can1 message slot 11 extended id 0 can1 message slot 11 extended id 1 13-60 (c1msl11eid0) (c1msl11eid1) 13-61 h'0080 15b4 can1 message slot 11 extended id 2 can1 message slot 11 data length register 13-62 (c1msl11eid2) (c1msl11dlc) 13-63 h'0080 15b6 can1 message slot 11 data 0 can1 message slot 11 data 1 13-64 (c1msl11dt0) (c1msl11dt1) 13-65 h'0080 15b8 can1 message slot 11 data 2 can1 message slot 11 data 3 13-66 (c1msl11dt2) (c1msl11dt3) 13-67 h'0080 15ba can1 message slot 11 data 4 can1 message slot 11 data 5 13-68 (c1msl11dt4) (c1msl11dt5) 13-69 h'0080 15bc can1 message slot 11 data 6 can1 message slot 11 data 7 13-70 (c1msl11dt6) (c1msl11dt7) 13-71 h'0080 15be can1 message slot 11 timestamp 13-72 (c1msl11tsp) h'0080 15c0 can1 message slot 12 standard id 0 can1 message slot 12 standard id 1 13-58 (c1msl12sid0) (c1msl12sid1) 13-59 h'0080 15c2 can1 message slot 12 extended id 0 can1 message slot 12 extended id 1 13-60 (c1msl12eid0) (c1msl12eid1) 13-61 h'0080 15c4 can1 message slot 12 extended id 2 can1 message slot 12 data length register 13-62 (c1msl12eid2) (c1msl12dlc) 13-63 h'0080 15c6 can1 message slot 12 data 0 can1 message slot 12 data 1 13-64 (c1msl12dt0) (c1msl12dt1) 13-65 h'0080 15c8 can1 message slot 12 data 2 can1 message slot 12 data 3 13-66 (c1msl12dt2) (c1msl12dt3) 13-67 h'0080 15ca can1 message slot 12 data 4 can1 message slot 12 data 5 13-68 (c1msl12dt4) (c1msl12dt5) 13-69 h'0080 15cc can1 message slot 12 data 6 can1 message slot 12 data 7 13-70 (c1msl12dt6) (c1msl12dt7) 13-71 h'0080 15ce can1 message slot 12 timestamp 13-72 (c1msl12tsp)
3 3-32 address space 3.4 internal ram and sfr areas 32176 group user?s manual (rev.1.01) sfr area register map (22/22) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 15d0 can1 message slot 13 standard id 0 can1 message slot 13 standard id 1 13-58 (c1msl13sid0) (c1msl13sid1) 13-59 h'0080 15d2 can1 message slot 13 extended id 0 can1 message slot 13 extended id 1 13-60 (c1msl13eid0) (c1msl13eid1) 13-61 h'0080 15d4 can1 message slot 13 extended id 2 can1 message slot 13 data length register 13-62 (c1msl13eid2) (c1msl13dlc) 13-63 h'0080 15d6 can1 message slot 13 data 0 can1 message slot 13 data 1 13-64 (c1msl13dt0) (c1msl13dt1) 13-65 h'0080 15d8 can1 message slot 13 data 2 can1 message slot 13 data 3 13-66 (c1msl13dt2) (c1msl13dt3) 13-67 h'0080 15da can1 message slot 13 data 4 can1 message slot 13 data 5 13-68 (c1msl13dt4) (c1msl13dt5) 13-69 h'0080 15dc can1 message slot 13 data 6 can1 message slot 13 data 7 13-70 (c1msl13dt6) (c1msl13dt7) 13-71 h'0080 15de can1 message slot 13 timestamp 13-72 (c1msl13tsp) h'0080 15e0 can1 message slot 14 standard id 0 can1 message slot 14 standard id 1 13-58 (c1msl14sid0) (c1msl14sid1) 13-59 h'0080 15e2 can1 message slot 14 extended id 0 can1 message slot 14 extended id 1 13-60 (c1msl14eid0) (c1msl14eid1) 13-61 h'0080 15e4 can1 message slot 14 extended id 2 can1 message slot 14 data length register 13-62 (c1msl14eid2) (c1msl14dlc) 13-63 h'0080 15e6 can1 message slot 14 data 0 can1 message slot 14 data 1 13-64 (c1msl14dt0) (c1msl14dt1) 13-65 h'0080 15e8 can1 message slot 14 data 2 can1 message slot 14 data 3 13-66 (c1msl14dt2) (c1msl14dt3) 13-67 h'0080 15ea can1 message slot 14 data 4 can1 message slot 14 data 5 13-68 (c1msl14dt4) (c1msl14dt5) 13-69 h'0080 15ec can1 message slot 14 data 6 can1 message slot 14 data 7 13-70 (c1msl14dt6) (c1msl14dt7) 13-71 h'0080 15ee can1 message slot 14 timestamp 13-72 (c1msl14tsp) h'0080 15f0 can1 message slot 15 standard id 0 can1 message slot 15 standard id 1 13-58 (c1msl15sid0) (c1msl15sid1) 13-59 h'0080 15f2 can1 message slot 15 extended id 0 can1 message slot 15 extended id 1 13-60 (c1msl15eid0) (c1msl15eid1) 13-61 h'0080 15f4 can1 message slot 15 extended id 2 can1 message slot 15 data length register 13-62 (c1msl15eid2) (c1msl15dlc) 13-63 h'0080 15f6 can1 message slot 15 data 0 can1 message slot 15 data 1 13-64 (c1msl15dt0) (c1msl15dt1) 13-65 h'0080 15f8 can1 message slot 15 data 2 can1 message slot 15 data 3 13-66 (c1msl15dt2) (c1msl15dt3) 13-67 h'0080 15fa can1 message slot 15 data 4 can1 message slot 15 data 5 13-68 (c1msl15dt4) (c1msl15dt5) 13-69 h'0080 15fc can1 message slot 15 data 6 can1 message slot 15 data 7 13-70 (c1msl15dt6) (c1msl15dt7) 13-71 h'0080 15fe can1 message slot 15 timestamp 13-72 (c1msl15tsp) (use inhibited area) h'0080 3ffe (use inhibited area) |
3 3-33 address space 32176 group user?s manual (rev.1.01) 3.5 eit vector entry 3.5 eit vector entry the eit vector entry is located at the beginning of the internal rom/external extension areas. the branch instruction for jumping to the start address of each eit event processing handler is written here. note that it is the branch instruction and not the jump address itself that is written here. for details, see chapter 4, ?eit.? h'0000 0040 h'0000 0044 h'0000 0048 h'0000 004c h'0000 0050 h'0000 0054 h'0000 0058 h'0000 005c h'0000 0060 h'0000 0064 h'0000 0068 h'0000 006c h'0000 0070 h'0000 0074 h'0000 0078 h'0000 007c h'0000 0080 h'0000 0030 h'0000 0020 h'0000 0010 h'0000 0000 h'0000 0034 h'0000 0038 h'0000 003c h'0000 0024 h'0000 0028 h'0000 002c h'0000 0004 h'0000 0008 h'0000 000c h'0000 0014 h'0000 0018 h'0000 001c trap0 trap1 trap2 trap3 trap4 trap5 trap6 trap7 trap8 trap9 trap10 trap11 trap12 trap13 trap14 trap15 ae (address exception) ei (external interrupt) (note 1) ri (reset interrupt) sbi (system break interrupt) rie (reserved instruction exception) 031 note 1: when flash entry bit = 1 (flash e/w enable mode), the ei vector entry is located at h'0080 4000. figure 3.5.1 eit vector entry
3 3-34 address space 32176 group user?s manual (rev.1.01) 3.6 icu vector table the icu vector table is used by the internal interrupt controller of the microcomputer. this table has the addresses shown below, at which the start addresses of interrupt handlers for the interrupt requests from respective internal peripheral i/os are set. for details, see chapter 5, ?interrupt controller.? icu vector table memory map (1/2) address +0 address +1 address b0 b7 b8 b15 h'0000 0094 mjt input interrupt 4 handler start address (a0?a15) h'0000 0096 mjt input interrupt 4 handler start address (a16?a31) h'0000 0098 mjt input interrupt 3 handler start address (a0?a15) h'0000 009a mjt input interrupt 3 handler start address (a16?a31) h'0000 009c mjt input interrupt 2 handler start address (a0?a15) h'0000 009e mjt input interrupt 2 handler start address (a16?a31) h'0000 00a0 mjt input interrupt 1 handler start address (a0?a15) h'0000 00a2 mjt input interrupt 1 handler start address (a16?a31) h'0000 00a4 h'0000 00a6 h'0000 00a8 mjt output interrupt 7 handler start address (a0?a15) h'0000 00aa mjt output interrupt 7 handler start address (a16?a31) h'0000 00ac mjt output interrupt 6 handler start address (a0?a15) h'0000 00ae mjt output interrupt 6 handler start address (a16?a31) h'0000 00b0 mjt output interrupt 5 handler start address (a0?a15) h'0000 00b2 mjt output interrupt 5 handler start address (a16?a31) h'0000 00b4 mjt output interrupt 4 handler start address (a0?a15) h'0000 00b6 mjt output interrupt 4 handler start address (a16?a31) h'0000 00b8 mjt output interrupt 3 handler start address (a0?a15) h'0000 00ba mjt output interrupt 3 handler start address (a16?a31) h'0000 00bc mjt output interrupt 2 handler start address (a0?a15) h'0000 00be mjt output interrupt 2 handler start address (a16?a31) h'0000 00c0 mjt output interrupt 1 handler start address (a0?a15) h'0000 00c2 mjt output interrupt 1 handler start address (a16?a31) h'0000 00c4 mjt output interrupt 0 handler start address (a0?a15) h'0000 00c6 mjt output interrupt 0 handler start address (a16?a31) h'0000 00c8 dma0?4 interrupt handler start address (a0?a15) h'0000 00ca dma0?4 interrupt handler start address (a16?a31) h'0000 00cc sio1 receive interrupt handler start address (a0?a15) h'0000 00ce sio1 receive interrupt handler start address (a16?a31) h'0000 00d0 sio1 transmit interrupt handler start address (a0?a15) h'0000 00d2 sio1 transmit interrupt handler start address (a16?a31) h'0000 00d4 sio0 receive interrupt handler start address (a0?a15) h'0000 00d6 sio0 receive interrupt handler start address (a16?a31) 3.6 icu vector table
3 3-35 address space 32176 group user?s manual (rev.1.01) 3.6 icu vector table icu vector table memory map (2/2) address +0 address +1 address b0 b7 b8 b15 h'0000 00d8 sio0 transmit interrupt handler start address (a0?a15) h'0000 00da sio0 transmit interrupt handler start address (a16?a31) h'0000 00dc a-d0 conversion interrupt handler start address (a0?a15) h'0000 00de a-d0 conversion interrupt handler start address (a16?a31) h'0000 00e0 h'0000 00e2 h'0000 00e4 h'0000 00e6 h'0000 00e8 dma5?9 interrupt handler start address (a0?a15) h'0000 00ea dma5?9 interrupt handler start address (a16?a31) h'0000 00ec sio2, 3 transmit/receive interrupt handler start address (a0?a15) h'0000 00ee sio2, 3 transmit/receive interrupt handler start address (a16?a31) h'0000 00f0 rtd interrupt handler start address (a0?a15) h'0000 00f2 rtd interrupt handler start address (a16?a31) h'0000 00f4 h'0000 00f6 h'0000 00f8 h'0000 00fa h'0000 00fc h'0000 00fe h'0000 0100 h'0000 0102 h'0000 0104 h'0000 0106 h'0000 0108 h'0000 010a h'0000 010c can0 transmit/receive & error interrupt handler start address (a0?a15) h'0000 010e can0 transmit/receive & error interrupt handler start address (a16?a31) h'0000 0110 can1 transmit/receive & error interrupt handler start address (a0?a15) h'0000 0112 can1 transmit/receive & error interrupt handler start address (a16?a31)
3 3-36 address space 32176 group user?s manual (rev.1.01) 3.7 notes about address space 3.7 notes about address space ? virtual flash emulation function the microcomputer has the function to map up to two 8-kbyte memory blocks of the internal ram into areas of the internal flash memory (l banks) that are divided in 8-kbyte units, as well as to map up to two 4-kbyte memory blocks of the internal ram into areas of the internal flash memory (s banks) that are divided in 4-kbyte units. this function is referred to as the virtual flash emulation function. for details about this function, refer to section 6.6, ?virtual flash emulation function.?
chapter 4 eit 4.1 outline of eit 4.2 eit events 4.3 eit processing procedure 4.4 eit processing mechanism 4.5 acceptance of eit events 4.6 saving and restoring the pc and psw 4.7 eit vector entry 4.8 exception processing 4.9 interrupt processing 4.10 trap p rocessing 4.11 eit priority levels 4.12 example of eit processing 4.13 precautions on eit
4 4-2 eit 32176 group user?s manual (rev.1.01) 4.1 outline of eit if some event occurs when the cpu is executing an ordinary program, it may become necessary to suspend the program being executed and execute another program. events like this one are referred to by a generic name as eit (exception, interrupt and trap). (1) exception this is an event related to the context being executed. it is generated by an error or violation during instruction execution. this type of event includes address exception (ae) and reserved instruction exception (rie) . (2) interrupt this is an event generated irrespective of the context being executed. it is generated by a hardware-derived signal from an external source. this type of event includes reset interrupt (ri), system break interrupt (sbi) and external interrupt (ei). (3) trap this refers to a software interrupt generated by executing a trap instruction. this type of event is intentionally generated in a program as in the os?s system call by the programmer. 4.1 outline of eit figure 4.1.1 classification of eits eit exception (exception) reserved instruction exception (rie) address exception (ae) reset interrupt (ri) system break interrupt (sbi) external interrupt (ei) tra p (trap) interrupt (interrupt) tra p (tra p )
4 4-3 eit 32176 group user?s manual (rev.1.01) 4.2 eit events 4.2 eit events 4.2.1 exception (1) reserved instruction exception (rie) reserved instruction exception (rie) occurs when execution of a reserved instruction (unimplemented instruction) is detected. (2) address exception (ae) address exception (ae) occurs when an attempt is made to access a misaligned address in load or store instructions. 4.2.2 interrupt (1) reset interrupt (ri) reset interrupt (ri) is always accepted by entering the reset# signal. the reset interrupt is assigned the highest priority. (2) system break interrupt (sbi) system break interrupt (sbi) is an emergency interrupt which is used when power outage is detected or a fault condition is notified by an external watchdog timer. this interrupt can only be used in cases when after interrupt processing, control will not return to the program that was being executed when the interrupt occurred. (3) external interrupt (ei) external interrupt (ei) is requested from internal peripheral i/os managed by the interrupt controller. the internal interrupt controller manages these interrupts by assigning each one of eight priority levels including an interrupt-disabled state. 4.2.3 trap traps are software interrupts which are generated by executing the trap instruction. sixteen distinct vector addresses are provided corresponding to trap instruction operands 0?15.
4 4-4 eit 32176 group user?s manual (rev.1.01) 4.3 eit processing procedure eit processing consists of two parts, one in which they are handled automatically by hardware, and one in which they are handled by user-created programs (eit handlers). the procedure for processing eits when accepted, except for a reset interrupt, is shown below. 4.3 eit processing procedure figure 4.3.1 outline of the eit processing procedure instruction a pc bpc psw (b)psw eit vector entry eit handler except for sbi rte instruction program suspended and eit request accepted instruction processing-canceled type (rie, ae) instruction processing-completed type (ei, trap) program execution restarted eit request generated hardware preprocessing bpc, psw and general-purpose registers are saved to the stack branch instruction general-purpose registers, psw and bpc are restored from the stack hardware postprocessing (sbi) program terminated or system is reset user-created eit handler (b)psw psw bpc pc processing by handler note 1: (b)psw indicates the bpsw field for the psw register. (note 1) sbi (system break interrupt processing) instruction b instruction c instruction c instruction d
4 4-5 eit 32176 group user?s manual (rev.1.01) when an eit is accepted, the cpu branches to the eit vector after hardware preprocessing (as will be described later). the eit vector has an entry address assigned for each eit. this is where the bra (branch) instruction for the eit handler (not the jump address itself) is written. in the hardware preprocessing, the content of the pc and psw registers is transferred to the backup register (bpc register and bpsw field in the psw register). other necessary operations must be performed in the user-created eit handler. these include saving the bpc register and psw register (including the bpsw field) and the general-purpose registers to be used in the eit handler to the stack. in addition, the accumulator must be saved to the stack as necessary. remember that all these registers must be saved to the stack in a program by the user. when processing by the eit handler is completed, restore the saved registers from the stack and finally execute the rte instruction. control is thereby returned from the eit processing to the program that was being executed when the eit occurred. (this does not apply to the system break interrupt, however.) in the hardware postprocessing, the content of the backup register (bpc register and bpsw field in the psw register) is returned to the pc and psw registers. note that the values stored in the bpc and the psw register?s bpsw field after executing the rte instruction are undefined. 4.3 eit processing procedure
4 4-6 eit 32176 group user?s manual (rev.1.01) 4.4 eit processing mechanism the eit processing mechanism consists of the m32r cpu core and the interrupt controller for internal peripheral i/ os. it also has the backup registers for the pc and psw (the bpc register and the bpsw field in the psw register). the eit processing mechanism is shown below. 4.4 eit processing mechanism figure 4.4.1 eit processing mechanism interrupt controller (icu) sbi ei internal peripheral i/os reset# ri ae, rie, trap ie flag (psw) m32r cpu core sbi# low high priority sbi ei ri m32r/ecu psw register psw bpsw bpc register pc register
4 4-7 eit 32176 group user?s manual (rev.1.01) 4.5 acceptance of eit events when an eit event occurs, the cpu suspends the program it has hitherto been executing and branches to eit processing by the relevant handler. conditions under which each eit event occurs and the timing at which they are accepted are shown below. table 4.5.1 acceptance of eit events eit event type of processing acceptance timing values set in bpc register reserved instruction in struction processing- during instruction execution pc value of the instruction that exception (rie) canceled type generated rie address exception (ae) instruction processing- during instruction execution pc value of the instruction that canceled type generated ae reset interrupt (ri) in struction processing- each machine cycle undefined value aborted type system break interrupt instruction processing- break in instructions pc value of the next instruction (sbi) completed type (word boundary only) external interrupt (ei) instruction processing- break in instructions pc value of the next instruction completed type (word boundary only) trap (trap) in struction processing- break in instructions pc value of trap instruction + 4 completed type 4.6 saving and restoring the pc and psw the following describes operation of the microcomputer at the time when it accepts an eit and when it executes the rte instruction. (1) hardware preprocessing when an eit is accepted [1] save the psw register?s sm, ie and c bits in its backup field. bsm [2] update the psw register?s sm, ie and c bits sm [3] save the pc register bpc [4] set the vector address in the pc register branches to the eit vector and executes the branch (bra) instruction written in it, thereby transferring control to the user-created eit handler. (2) hardware postprocessing when the rte instruction is executed [a] restore the psw register?s sm, ie and c bits from its backup field. sm [b] restore the pc register from the bpc register. pc 4.5 acceptance of eit events
4 4-8 eit 32176 group user?s manual (rev.1.01) 4.6 saving and restoring the pc and psw psw bpc pc when eit is accepted when rte instruction is executed [1] saving the sm, ie and c bits bsm bie bc sm ie c [2] updating the sm, ie and c bits sm ie c unchanged or 0 0 0 [3] saving the pc bpc pc [4] setting the vector address in the pc pc vector address [b] restoring the pc from the bpc register the value stored in the bpc register after executing the rte instruction is undefined. [a] restoring the sm, ie and c bits from the backup field sm ie c the values stored in the bsm, bie and bc bits after executing the rte instruction are undefined. bsm bie bc [1] [a] [b] [2] [3] [4] figure 4.6.1 saving and restoring the pc and psw 16 17 23 24 25 31(lsb) 15 8 7 0(msb) sm ie c bc bsm bie 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 psw bpsw field psw field
4 4-9 eit 32176 group user?s manual (rev.1.01) 4.7 eit vector entry the eit vector entry is located in the user space beginning with the address h?0000 0000. the table below lists the eit vector entry. table 4.7.1 eit vector entry name abbreviation vector address sm ie bpc reset interrupt ri h'0000 0000 (note 1) 0 0 undefined system break sbi h'0000 0010 0 0 pc of the next instruction interrupt reserved instruction rie h'0000 0020 unchanged 0 pc of the instruction that generated rie exception address exception ae h'0000 0030 unchanged 0 pc of the instruction that generated ae trap trap0 h'0000 0040 unchanged 0 pc of trap instruction + 4 trap1 h'0000 0044 unchanged 0 pc of trap instruction + 4 trap2 h'0000 0048 unchanged 0 pc of trap instruction + 4 trap3 h'0000 004c unchanged 0 pc of trap instruction + 4 trap4 h'0000 0050 unchanged 0 pc of trap instruction + 4 trap5 h'0000 0054 unchanged 0 pc of trap instruction + 4 trap6 h'0000 0058 unchanged 0 pc of trap instruction + 4 trap7 h'0000 005c unchanged 0 pc of trap instruction + 4 trap8 h'0000 0060 unchanged 0 pc of trap instruction + 4 trap9 h'0000 0064 unchanged 0 pc of trap instruction + 4 trap10 h'0000 0068 unchanged 0 pc of trap instruction + 4 trap11 h'0000 006c unchanged 0 pc of trap instruction + 4 trap12 h'0000 0070 unchanged 0 pc of trap instruction + 4 trap13 h'0000 0074 unchanged 0 pc of trap instruction + 4 trap14 h'0000 0078 unchanged 0 pc of trap instruction + 4 trap15 h'0000 007c unchanged 0 pc of trap instruction + 4 external interrupt ei h'0000 0080 (note 2) 0 0 pc of the next instruction note 1: during boot mode, the cpu starts executing the boot program after exiting the reset state. for details, see section 6.5, ?programming the internal flash memory.? note 2: during flash e/w enable mode, this vector address is moved to the beginning of the internal ram (address h?0080 4000). for details, see section 6.5, ?programming the internal flash memory.? 4.7 eit vector entry
4 4-10 eit 32176 group user?s manual (rev.1.01) 4.8 exception processing 4.8 exception processing 4.8.1 reserved instruction exception (rie) [occurrence conditions] reserved instruction exception (rie) occurs when a reserved instruction (unimplemented instruction) is detected. instruction check is performed on the op-code part of the instruction. when a reserved instruction exception occurs, the instruction that generated it is not executed. if an exter- nal interrupt is requested at the same time a reserved instruction exception is detected, it is the reserved instruction exception that is accepted. [eit processing] (1) saving sm, ie and c bits the psw register?s sm, ie and c bits are saved to the respective backup bits: bsm, bie and bc. bsm (2) updating sm, ie and c bits the psw register?s sm, ie and c bits are updated as shown below. sm (3) saving the pc the pc value of the instruction that generated the reserved instruction exception is set in the bpc register. for example, if the instruction that generated the reserved instruction exception is at address 4, the value 4 is set in the bpc register. similarly, if the instruction that generated the reserved instruction exception is at address 6, the value 6 is set in the bpc register. in this case, the value of the bpc register bit 30 indicates whether the instruction that generated the reserved instruction exception resides on a word boundary (bpc[30] = 0) or not on a word boundary (bpc[30] = 1). however, in either case of the above, the address to which the rte instruction returns after the eit handler has terminated is address 4. (this is because the 2 low-order address bits are cleared to ?00? when returned to the pc.) figure 4.8.1 example of a return address for reserved instruction exception (rie) h'00 address rie occurred h'04 h'08 h'0c +0 +1 +2 +3 h'00 address rie occurred h'04 h'08 h'0c +0 +1 +2 +3 return address bpc h'06 bpc h'04 return address
4 4-11 eit 32176 group user?s manual (rev.1.01) 4.8 exception processing (4) branching to the eit vector entry the cpu branches to the address h?0000 0020 in the user space. this is the last operation performed in hardware preprocessing. (5) jumping from the eit vector entry to the user-created handler the cpu executes the bra instruction written by the user at the address h?0000 0020 of the eit vector entry to jump to the start address of the user-created handler. at the beginning of the user-created eit handler, first save the bpc and psw registers and the necessary general-purpose registers to the stack. also, save the accumulator as necessary. (6) returning from the eit handler at the end of the eit handler, restore the saved registers from the stack and execute the rte instruction. when the rte instruction is executed, hardware postprocessing is automatically performed. at this time, the cpu restarts from a word-boundary instruction including the instruction that generated a rie (see figure 4.8.1). except when using reserved instruction exceptions intentionally, occurrence of a reserved instruc- tion exception suggests that the system has some fatal fault already existing in it. in such a case, therefore, do not return from the reserved instruction exception handler to the program that was being executed when the exception occurred.
4 4-12 eit 32176 group user?s manual (rev.1.01) 4.8 exception processing figure 4.8.2 example of a return address for address exception (ae) h'00 address ae occurred h'04 h'08 h'0c +0 +1 +2 +3 h'00 address ae occurred h'04 h'08 h'0c +0 +1 +2 +3 bpc h'06 bpc h'04 return address return address 4.8.2 address exception (ae) [occurrence conditions] address exception (ae) occurs when an attempt is made to access a misaligned address in load or store instructions. the following lists the combination of instructions and accessed addresses that may cause address exceptions to occur. ? two low-order address bits accessed in the ldh, lduh or sth instruction are ?01? or ?11? ? two low-order address bits accessed in the ld, st, lock or unlock instruction are ?01,? ?10? or ?11? when an address exception occurs, memory access by the instruction that generated the exception is not performed. if an external interrupt is requested at the same time an address exception is detected, it is the address exception that is accepted. [eit processing] (1) saving sm, ie and c bits the psw register?s sm, ie and c bits are saved to the respective backup bits: bsm, bie and bc. bsm (2) updating sm, ie and c bits the psw register?s sm, ie and c bits are updated as shown below. sm (3) saving the pc the pc value of the instruction that generated the address exception is set in the bpc register. for example, if the instruction that generated the address exception is at address 4, the value 4 is set in the bpc register. similarly, if the instruction that generated the address exception is at address 6, the value 6 is set in the bpc register. in this case, the value of the bpc register bit 30 indicates whether the instruction that generated the reserved instruction exception resides on a word boundary (bpc[30] = 0) or not on a word boundary (bpc[30] = 1). however, in either case of the above, the address to which the rte instruction returns after the eit handler has terminated is address 4. (this is because the 2 low-order address bits are cleared to ?00? when returned to the pc.)
4 4-13 eit 32176 group user?s manual (rev.1.01) 4.8 exception processing (4) branching to the eit vector entry the cpu branches to the address h?0000 0030 in the user space. this is the last operation performed in hardware preprocessing. (5) jumping from the eit vector entry to the user-created handler the cpu executes the bra instruction written by the user at the address h?0000 0030 of the eit vector entry to jump to the start address of the user-created handler. at the beginning of the user-created eit handler, first save the bpc and psw registers and the necessary general-purpose registers to the stack. also, save the accumulator as necessary. (6) returning from the eit handler at the end of the eit handler, restore the saved registers from the stack and execute the rte instruction. when the rte instruction is executed, hardware postprocessing is automatically performed. at this time, the cpu restarts from a word-boundary instruction including the instruction that generated an ae (see figure 4.8.2). except when using address exceptions intentionally, occurrence of an address exception suggests that the system has some fatal fault already existing in it. in such a case, therefore, do not return from the address exception handler to the program that was being executed when the exception occurred.
4 4-14 eit 32176 group user?s manual (rev.1.01) 4.9 interrupt processing 4.9 interrupt processing 4.9.1 reset interrupt (ri) [occurrence conditions] a reset interrupt is accepted in machine cycle by pulling the reset# input signal low. the reset interrupt is assigned the highest priority among all eits. [eit processing] (1) initializing sm, ie and c bits the psw register?s sm, ie and c bits are initialized as shown below. sm (2) branching to the eit vector entry the cpu branches to the address h?0000 0000 in the user space. however, when operating in boot mode, the cpu jumps to the boot program. for details, see section 6.5, ?programming the internal flash memory.? (3) jumping from the eit vector entry to the user program the cpu executes the instruction written by the user at the address h?0000 0000 of the eit vector entry. in the reset vector entry, be sure to initialize the psw and spi registers before jumping to the start address of the user program.
4 4-15 eit 32176 group user?s manual (rev.1.01) 4.9.2 system break interrupt (sbi) system break interrupt (sbi) is an emergency interrupt which is used when power outage is detected or a fault condition is notified by an external watchdog timer. the system break interrupt cannot be masked by the psw register ie bit. therefore, the system break interrupt can only be used when the system has some fatal event already existing in it when the interrupt is detected. also, this interrupt must be used on condition that after processing by the sbi handler, control will not return to the program that was being executed when the system break interrupt occurred. [occurrence conditions] a system break interrupt is accepted by a falling edge on sbi# input pin. (the system break interrupt cannot be masked by the psw register ie bit.) in no case will a system break interrupt be activated immediately after executing a 16-bit instruction that starts from a word boundary. (for 16-bit branch instructions, however, the interrupt is accepted immediately after branching.) note also that because of the instruction processing-completed type, a system break interrupt is accepted after the instruction is completed. 4.9 interrupt processing 16-bit instruction order in which instructions are executed 32-bit instruction address 1000 address 1002 address 1004 address 1008 interrupt may be accepted interrupt cannot be accepted 16-bit instruction interrupt may be accepted interrupt may be accepted figure 4.9.1 timing at which system break interrupt (sbi) is accepted
4 4-16 eit 32176 group user?s manual (rev.1.01) [eit processing] (1) saving sm, ie and c bits the psw register?s sm, ie and c bits are saved to the respective backup bits: bsm, bie and bc. bsm (2) updating sm, ie and c bits the psw register?s sm, ie and c bits are updated as shown below. sm (3) saving the pc the content of the pc register (always on word boundary) is saved to the bpc register. if the interrupt was detected in a branch instruction, then the next instruction is one that exists at the jump address. (4) branching to the eit vector entry the cpu branches to the address h?0000 0010 in the user space. this is the last operation performed in hardware preprocessing. (5) jumping from the eit vector entry to the user-created handler the cpu executes the bra instruction written by the user at the address h?0000 0010 of the eit vector entry to jump to the start address of the user-created handler. the system break interrupt can only be used when the system has some fatal event already existing in it when the interrupt is detected. also, this interrupt must be used on condition that after processing by the sbi handler, control will not return to the program that was being executed when the system break interrupt occurred. 4.9 interrupt processing
4 4-17 eit 32176 group user?s manual (rev.1.01) figure 4.9.2 timing at which external interrupt (ei) is accepted 4.9.3 external interrupt (ei) an external interrupt is generated upon an interrupt request which is output by the microcomputer?s internal interrupt controller. the interrupt controller manages interrupt requests by assigning each one of seven priority levels. for details, see chapter 5, ?interrupt controller.? for details about the interrupt request sources, see each section in which the relevant internal peripheral i/o is described. [occurrence conditions] external interrupts are managed by the microcomputer?s internal interrupt controller based on interrupt requests from each internal peripheral i/o, and are sent to the cpu via the interrupt controller. the cpu checks these interrupt requests at a break in instructions residing on word boundaries, and when an interrupt request is de- tected and the psw register ie flag = "1", accepts it as an external interrupt. in no case will an external interrupt be activated immediately after executing a 16-bit instruction that starts from a word boundary. (for 16-bit branch instructions, however, the interrupt is accepted immediately after branching.) 4.9 interrupt processing 16-bit instruction order in which instructions are executed 32-bit instruction address 1000 address 1002 address 1004 address 1008 interrupt may be accepted interrupt cannot be accepted 16-bit instruction interrupt may be accepted interrupt may be accepted
4 4-18 eit 32176 group user?s manual (rev.1.01) 4.9 interrupt processing [eit processing] (1) saving sm, ie and c bits the psw register?s sm, ie and c bits are saved to the respective backup bits: bsm, bie and bc. bsm (2) updating sm, ie and c bits the psw register?s sm, ie and c bits are updated as shown below. sm (3) saving the pc the content of the pc register (always on word boundary) is saved to the bpc register. (4) branching to the eit vector entry the cpu branches to the address h?0000 0080 in the user space. however, when operating in flash e/w enable mode, the cpu goes to the beginning of the internal ram (address h?0080 4000). (for details, see section 6.5, ?programming the internal flash memory.?) this is the last operation performed in hardware preprocessing. (5) jumping from the eit vector entry to the user-created handler the cpu executes the bra instruction written by the user at the address h?0000 0080 of the eit vector entry to jump to the start address of the user-created handler. at the beginning of the user-created eit handler, first save the bpc and psw registers and the necessary general-purpose registers to the stack. also, save the accumulator as necessary. (6) returning from the eit handler at the end of the eit handler, restore the saved registers from the stack and execute the rte instruction. when the rte instruction is executed, hardware postprocessing is automatically performed.
4 4-19 eit 32176 group user?s manual (rev.1.01) figure 4.10.1 example of a return address for trap (trap) h'00 address h'04 h'08 h'0c +0 +1 +2 +3 h'00 address h'04 h'08 h'0c +0 +1 +2 +3 bpc h'0a bpc h'08 trap instruction return address return address trap instruction 4.10 trap processing 4.10.1 trap [occurrence conditions] traps are software interrupts which are generated by executing the trap instruction. sixteen traps are generated, each corresponding to one of trap instruction operands 0?15. accordingly, sixteen vector en- tries are provided. [eit processing] (1) saving sm, ie and c bits the psw register?s sm, ie and c bits are saved to the respective backup bits: bsm, bie and bc. bsm (2) updating sm, ie and c bits the psw register?s sm, ie and c bits are updated as shown below. sm (3) saving the pc when the trap instruction is executed, the pc value of trap instruction + 4 is set in the bpc register. for example, if the trap instruction is located at address 4, the value h?08 is set in the bpc register. similarly, if the trap instruction is located at address 6, the value h?0a is set in the bpc register. the value of the bpc register bit 30 indicates whether the trap instruction resides on a word boundary (bpc[30] = 0) or not on a word boundary (bpc[30] = 1). however, in either case of the above, the address to which the rte instruction returns after the eit handler has terminated is address 8. (this is because the 2 low-order address bits are cleared to ?00? when returned to the pc.) 4.10 trap processing
4 4-20 eit 32176 group user?s manual (rev.1.01) 4.10 trap processing (4) branching to the eit vector entry the cpu branches to the addresses h?0000 0040?h?0000 007c in the user space. this is the last operation performed in hardware preprocessing. (5) jumping from the eit vector entry to the user-created handler the cpu executes the bra instruction written by the user at the addresses h?0000 0040?h?0000 007c of the eit vector entry to jump to the start address of the user-created handler. at the beginning of the user- created eit handler, first save the bpc and psw registers and the necessary general-purpose registers to the stack. also, save the accumulator as necessary. (6) returning from the eit handler at the end of the eit handler, restore the saved registers from the stack and execute the rte instruction. when the rte instruction is executed, hardware postprocessing is automatically performed.
4 4-21 eit 32176 group user?s manual (rev.1.01) 4.11 eit priority levels the table below lists the priority levels of eit events. when two or more eits occur simultaneously, the event with the highest priority is accepted first. table 4.11.1 priority of eit events and how returned from eit priority eit event type of processing values set in bpc register 1 (highest) reset inter rupt (ri) instruction processing-aborted type undefined 2 address exception (ae) instruction processing-canceled type pc of the instruction that generated ae reserved instruction instruction processing-canceled type pc of the instruction that exception (rie) generated rie trap (trap) instruction processing-completed type trap instruction + 4 3 system break interrupt instruction processing-completed type pc of the next instruction (sbi) 4 external interrupt (ei) instruction processing-completed type pc of the next instruction note that for external interrupt (ei), the priority levels of interrupt requests from each peripheral i/o are set by the microcomputer?s internal interrupt controller. for details, see chapter 5, ?interrupt controller.? 4.11 eit priority levels
4 4-22 eit 32176 group user?s manual (rev.1.01) 4.12 example of eit processing 4.12 example of eit processing (1) when rie, ae, sbi, ei or trap occurs singly figure 4.12.1 processing of events when rie, ae, sbi, ei or trap occurs singly (2) when rie, ae or trap and ei occur simultaneously figure 4.12.2 processing of events when rie, ae or trap and ei occur simultaneously rte instruction ie = 0 rie, ae or trap is accepted first. bpc register = return address a ie = 1 rie, ae or trap and ei occur simultaneously return address a: ie = 1 ie = 0 ie = 1 rte instruction : eit handler ei is accepted next. bpc register = return address a rte instruction ie = 0 ie = 1 bpc register = return address a ie = 1 rie, ae, sbi, ei or trap occurs singly return address a: if ie = 0, no events but reset and sbi are accepted. : eit handler
4 4-23 eit 32176 group user?s manual (rev.1.01) 4.12 example of eit processing figure 4.12.3 example of eit processing bra instruction rte eit handler eit vector entry program being executed save bpc to the stack save psw to the stack save general-purpose registers to the stack processing by eit handler restore general-purpose registers from the stack restore psw from the stack restore bpc from the stack eit event occurs (sbi) system break interrupt (sbi) processing program terminated or system reset (other than sbi) pc bpc psw (b)psw hardware preprocessing hardware postprocessing (b)psw psw bpc pc (note 1) (note 1) note 1: indicates saving and restoring the psw register bits between its psw and bpsw fields.
4 4-24 eit 32176 group user?s manual (rev.1.01) 4.13 precautions on eit 4.13 precautions on eit the address exception (ae) requires caution because if one of the instructions that use ?register indirect + register update? addressing mode (following three) generates an address exception when it is executed, the values of the registers to be automatically updated (rsrc and rsrc2) become undefined. except that the values of rsrc and rsrc2 become undefined, these instructions behave the same way as when used in other addressing modes. ? applicable instructions ld rdest, @rsrc+ st rsrc1, @-rsrc2 st rsrc1, @+rsrc2 if the above case applies, consider the fact that the register values become undefined when you design the processing to be performed after executing said instructions. (if an address exception occurs, it means that the system has some fatal fault already existing in it. therefore, address exceptions must be used on condition that control will not be returned from the address exception handler to the program that was being executed when the exception occurred.)
chapter 5 interrupt controller (icu) 5.1 outline of the interrupt controller 5.2 icu related registers 5.3 interrupt request sources in internal peripheral i/o 5.4 icu vector table 5.5 description of interrupt operation 5.6 description of system break interrupt (sbi) operation
5 5-2 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.1 outline of the interrupt controller the interrupt controller (icu) manages maskable interrupts from internal peripheral i/os and a system break interrupt (sbi). the maskable interrupts from internal peripheral i/os are sent to the m32r cpu as external interrupts (ei). the maskable interrupts from internal peripheral i/os are managed by assigning them one of eight priority levels including an interrupt-disabled state. if two or more interrupt requests with the same priority level occur at the same time, their priorities are resolved by predetermined hardware priority. the source of an interrupt request generated in internal peripheral i/os is identified by reading the relevant interrupt status register provided for internal peripheral i/os. on the other hand, the system break interrupt (sbi) is recognized when a falling edge occurs on the sbi# signal input pin. this interrupt is used for emergency purposes such as when power outage is detected or a fault condition is notified by an external watchdog timer, so that it is always accepted irrespective of the psw register ie bit status. after processing of an sbi, shut down or reset the system without returning to the program that was being executed when the interrupt occurred. specifications of the interrupt controller are outlined below. table 5.1.1 outline of the interrupt controller (icu) item specification interrupt request source maskable interrupt requests from internal peripheral i/os: 23 sources (note 1) system break interrupt request: 1 source (input from sbi# pin) priority management 8 priority levels including an interrupt-disabled state (however, interrupts with the same priority level have their priorities resolved by fixed hardware priority.) note 1: this is the number of interrupt requests divided into groups. there are actually a total of 123 interrupt request sources when counted individually. 5.1 outline of the interrupt controller
5 5-3 interrupt controller (icu) 32176 group user?s manual (rev.1.01) interrupt vector register (ivect) interrupt request mask register (imask) new_imask external interrupt (ei) request generated (maskable) imask compari- son ilevel system break interrupt (sbi) request generated (nonmaskable) sbi# ei sbi interrupt controller interrupt control register sbi control register (sbicr) sbireq ireq ireq ireq ireq ireq ireq peripheral circuits edge interrupt control circuit edge edge level interrupt request interrupt request interrupt request level level to the cpu core to the cpu core interrupt control circuit interrupt control circuit priority resolved by interrupt priority levels set priority resolved by fixed hardware priority figure 5.1.1 block diagram of the interrupt controller 5.1 outline of the interrupt controller
5 5-4 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.2 icu related registers 5.2 icu related registers the diagram below shows a register map associated with the interrupt controller (icu). icu related register map address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0000 interrupt vector register 5-5 (ivect) h'0080 0002 (use inhibited area) h'0080 0004 interrupt request mask register (use inhibited area) 5-6 (imask) h'0080 0006 sbi control register (use inhibited area) 5-7 (sbicr) (use inhibited area) h'0080 0060 can0 transmit/receive & error interrupt control register (use inhibited area) 5-8 (ican0cr) h'0080 0062 (use inhibited area) h'0080 0064 (use inhibited area) h'0080 0066 (use inhibited area) rtd interrupt control register 5-8 (irtdcr) h'0080 0068 sio2,3 transmit/receive interrupt control register dma5?9 interrupt control register 5-8 (isio23cr) (idma59cr) h'0080 006a (use inhibited area) h'0080 006c a-d0 conversion interrupt control register sio0 transmit interrupt control register 5-8 (iad0ccr) (isio0txcr) h'0080 006e sio0 receive interrupt control register sio1 transmit interrupt control register 5-8 (isio0rxcr) (isio1txcr) h'0080 0070 sio1 receive interrupt control register dma0?4 interrupt control register 5-8 (isio1rxcr) (idma04cr) h'0080 0072 mjt output interrupt control register 0 mjt output interrupt control register 1 5-8 (imjtocr0) (imjtocr1) h'0080 0074 mjt output interrupt control register 2 mjt output interrupt control register 3 5-8 (imjtocr2) (imjtocr3) h'0080 0076 mjt output interrupt control register 4 mjt output interrupt control register 5 5-8 (imjtocr4) (imjtocr5) h'0080 0078 mjt output interrupt control register 6 mjt output interrupt control register 7 5-8 (imjtocr6) (imjtocr7) h'0080 007a (use inhibited area) mjt input interrupt control register 1 5-8 (imjticr1) h'0080 007c mjt input interrupt control register 2 mjt input interrupt control register 3 5-8 (imjticr2) (imjticr3) h'0080 007e mjt input interrupt control register 4 can1 transmit/receive & error interrupt control register 5-8 (imjticr4) (ican1cr) |
5 5-5 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.2 icu related registers 5.2.1 interrupt vector register interrupt vector register (ivect) b01234567891011121314b15 ivect ???????????????? b bit name function r w 0-15 ivect when an interrupt request is accepted, the 16-low-order r n 16 low-order bits of icu vector table address bits of the icu vector table address for the accepted interrupt request source are stored in this register. note: ? this register must always be accessed in halfwords (2 bytes). (this is a read-only register.) the interrupt vector register (ivect) is used when an interrupt request is accepted to store the 16-low-order bits of the icu vector table address for the accepted interrupt request source. before this function can work, the icu vector table (addresses h?0000 0094 through h?0000 0113) must have set in it the start addresses of interrupt handlers for each internal peripheral i/o. when an interrupt request is accepted, the 16-low-order bits of the icu vector table address for the accepted interrupt request source are stored in the ivect register. in the eit handler, read the content of this ivect register using the ldh instruction to get the icu vector table address. when the ivect register is read, operations (1) to (4) below are automatically performed in hardware. (1) the interrupt priority level (ilevel) of the accepted interrupt request source is set in the imask register as a new imask value. (interrupts with lower priority levels than that of the accepted interrupt request source are masked.) (2) the interrupt request bit for the accepted interrupt request source is cleared (not cleared for level-recognized interrupt request sources). (3) the interrupt request (ei) to the cpu core is deasserted. (4) the icu?s internal sequencer is activated to start internal processing (interrupt priority resolution). notes: ? do not read the interrupt vector register (ivect) in the eit handler unless interrupts are disabled (psw register ie bit = "0"). in the eit handler, furthermore, read the interrupt request mask register (imask) first before reading the ivect register. ? to reenable interrupts (by setting the ie bit to "1") after reading the interrupt vector register (ivect), perform a dummy access to the internal memory, etc. before reenabling interrupts. (the icu vector table readout in the ei handler processing example in figure 5.5.2 typical handler operation for interrupts from internal peripheral i/o is an access to the internal rom and, there- fore, does not require adding a dummy access.)
5 5-6 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.2 icu related registers 5.2.2 interrupt request mask register interrupt request mask register (imask) 123456b7 b0 imask 111 0 0 0 0 0 b bit name function r w 0?4 no function assigned. fix to "0" 00 5?7 imask 000: disable maskable interrupts r w interrupt request mask bit 001: accept interrupts with priority level 0 010: accept interrupts with priority levels 0?1 011: accept interrupts with priority levels 0?2 100: accept interrupts with priority levels 0?3 101: accept interrupts with priority levels 0?4 110: accept interrupts with priority levels 0?5 111: accept interrupts with priority levels 0?6 the interrupt request mask register (imask) is used to finally determine whether or not to accept an interrupt request after comparing its priority with the priority levels (interrupt control register ilevel bits) that have been set for each interrupt request source. when the interrupt vector register (ivect) described above is read, the interrupt priority level of the accepted interrupt request source is set in this imask register as a new mask value. when any value is written to the imask register, operations (1) to (2) below are automatically performed in hardware. (1) the interrupt request (ei) to the cpu core is deasserted. (2) the icu?s internal sequencer is activated to start internal processing (interrupt priority resolution). notes: ? do not write to the interrupt request mask register (imask) in the eit handler unless interrupts are disabled (psw register ie bit = "0"). ? to reenable interrupts (by setting the ie bit to "1") after writing to the interrupt request mask register (imask), perform a dummy access to the internal memory, etc. before reenabling inter- rupts.
5 5-7 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.2 icu related registers 5.2.3 sbi (system break interrupt) control register sbi (system break interrupt) control register (sbicr) 123456b7 b0 sbireq 0 0 0 0 0 0 0 0 b bit name function r w 0?6 no function assigned. fix to "0" 00 7 sbireq 0: sbi not requested r (note 1) sbi request bit 1: sbi requested note 1: this bit can only be cleared (see below) the system break interrupt (sbi) is an interrupt request generated by a falling edge on the sbi# signal input pin. when a falling edge on the sbi# signal input pin is detected and this bit is set to "1", a system break interrupt (sbi) request is generated to the cpu. this bit cannot be set to "1" in software, it can only be cleared. to clear this bit to "0", follow the procedure described below. 1. write "1" to the sbi request bit. 2. write "0" to the sbi request bit. note: ? unless this bit is set to "1", do not perform the above clearing operation.
5 5-8 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.2 icu related registers 5.2.4 interrupt control registers can0 transmit/receive & error interrupt control register (ican0cr) rtd interrupt control register (irtdcr) sio2,3 transmit/receive interrupt control register (isio23cr) dma5?9 interrupt control register (idma59cr) a-d0 conversion interrupt control register (iad0ccr) sio0 transmit interrupt control register (isio0txcr) sio0 receive interrupt control register (isio0rxcr) sio1 transmit interrupt control register (isio1txcr) sio1 receive interrupt control register (isio1rxcr) dma0?4 interrupt control register (idma04cr) mjt output interrupt control register 0 (imjtocr0) mjt output interrupt control register 1 (imjtocr1) mjt output interrupt control register 2 (imjtocr2) mjt output interrupt control register 3 (imjtocr3) mjt output interrupt control register 4 (imjtocr4) mjt output interrupt control register 5 (imjtocr5) mjt output interrupt control register 6 (imjtocr6) mjt output interrupt control register 7 (imjtocr7) mjt input interrupt control register 1 (imjticr1) mjt input interrupt control register 2 (imjticr2) mjt input interrupt control register 3 (imjticr3) mjt input interrupt control register 4 (imjticr4) can1 transmit/receive & error interrupt control register (ican1cr)
5 5-9 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 9 1011121314b15) (b8 123456b7 b0 ilevel ire q 0 111 0 0 0 0 b bit name function r w 0?2 no function assigned. fix to "0" 00 (8?10) 3 ireq r w (11) interrupt request bit at read 0: interrupt not requested 1: interrupt requested at write 0: clear interrupt request 1: generate interrupt request r 0 at read 0: interrupt not requested 1: interrupt requested 4 no function assigned. fix to "0" 00 (12) 5?7 ilevel 000: interrupt priority level 0 r w (13?15) interrupt priority level bits 001: interrupt priority level 1 010: interrupt priority level 2 011: interrupt priority level 3 100: interrupt priority level 4 101: interrupt priority level 5 110: interrupt priority level 6 111: interrupt priority level 7 (interrupt disabled) (1) ireq (interrupt request) bit (bit 3 or 11) when an interrupt request from some internal peripheral i/o occurs, the corresponding ireq (interrupt re- quest) bit is set to "1". this bit can be set and cleared in software for only edge-recognized interrupt request sources (and not for level-recognized interrupt request sources). also, when this bit is set by an edge-recognized interrupt re- quest generated, it is automatically cleared to "0" by reading the interrupt vector register (ivect) (not cleared in the case of level-recognized interrupt request). if the ireq bit is cleared in software at the same time it is set by an interrupt request generated, clearing in software has priority. also, if the ireq bit is cleared by reading the interrupt vector register (ivect) at the same time it is set by an interrupt request generated, clearing by a read of the ivect register has priority. note: ? external interrupt (ei) to the cpu core is not deasserted by clearing the ireq bit. external interrupt (ei) to the cpu core can only be deasserted by the following operation: (1) reset (2) ivect register read (3) write to the imask register 5.2 icu related registers
5 5-10 interrupt controller (icu) 32176 group user?s manual (rev.1.01) (2) ilevel (interrupt priority level) (bits 5?7 or bits 13?15) these bits set the priority levels of interrupt requests from each internal peripheral i/o. set these bits to ?111? to disable or any value ?000? through ?110? to enable the interrupt from some internal peripheral i/o. when an interrupt occurs, the interrupt controller resolves priority between this interrupt and other interrupt sources based on ilevel settings and finally compares priority with the imask value to determine whether to forward an ei request to the cpu or keep the interrupt request pending. the table below shows the relationship between ilevel settings and the imask values at which interrupts are accepted. table 5.2.1 ilevel settings and accepted imask values ilevel values set imask values at which interrupts are accepted 0 (ilevel = "000") accepted when imask is 1?7 1 (ilevel = "001") accepted when imask is 2?7 2 (ilevel = "010") accepted when imask is 3?7 3 (ilevel = "011") accepted when imask is 4?7 4 (ilevel = "100") accepted when imask is 5?7 5 (ilevel = "101") accepted when imask is 6?7 6 (ilevel = "110") accepted when imask is 7 7 (ilevel = "111") not accepted (interrupts disabled) 5.2 icu related registers figure 5.2.1 configuration of the interrupt control register (edge-recognized type) interrupt request from each internal peripheral i/o interrupt enabled ilevel (levels 0-7) data bus b5-7 or b13-15 3 f/f set set/clear ireq interrupt priority resolving circuit f/f reset ivect read imask write clear to the cpu core b3 or b11 set ei interrupt request from each group internal peripheral i/o interrupt enabled b3 or b11 data bus b5-7 or b13-15 read 3 ireq read-only circuit ilevel (levels 0-7) group interrupt interrupt priority resolving circuit f/f clear to the cpu core set ei reset ivect read imask write figure 5.2.2 configuration of the interrupt control register (level-recognized type)
5 5-11 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.3 interrupt request sources in internal peripheral i/o the interrupt controller receives as inputs the interrupt requests from mjt (multijunction timer), dmac, serial i/o, a-d converter, rtd and can. for details about these interrupts, see each section in which the relevant internal peripheral i/o is described. table 5.3.1 interrupt request sources in internal peripheral i/o interrupt request sources contents number of icu type of input input sources source ( note 1) a-d0 conversion interrupt request a-d0 converter?s scan mode one-shot operation, 1 edge-recognized single mode or comparate mode completed sio0 transmit interrupt request sio0 transmission-completed or transmit buffer empty interrupt 1 edge-recognized sio0 receive interrupt request sio0 reception-completed or receive error interrupt 1 edge-recognized sio1 transmit interrupt request sio1 transmission-completed or transmit buffer empty interrupt 1 edge-recognized sio1 receive interrupt request sio1 reception-completed or receive error interrupt 1 edge-recognized sio2,3 transmit/receive interrupt sio2,3 reception-completed or receive error interrupt, 4 level-recognized request transmission-completed or transmit buffer empty interrupt rtd interrupt request rtd interrupt generation command 1 edge-recognized dma transfer interrupt request 0 dma0?4 transfer completed 5 level-recognized dma transfer interrupt request 1 dma5?9 transfer completed 5 level-recognized can0 transmit/receive & error can0 transmission or reception completed, can0 errorpassive, 35 level-recognized interrupt request can0 error bus-off, can0 bus error, can0 single shot can1 transmit/receive & error can1 transmission or reception completed, can1 error passive, 35 level-recognized interrupt request can1 error bus-off, can1 bus error, can1 single shot mjt output interrupt request 7 mjt output interrupt rgroup 7 (tms0, tms1 output) 2 level-recognized mjt output interrupt request 6 mjt output interrupt rgroup 6 (top8, top9 output) 2 level-recognized mjt output interrupt request 5 mjt output interrupt rgroup 5 (top10 output) 1 edge-recognized mjt output interrupt request 4 mjt output interrupt rgroup 4 (tio4?tio7 outputs) 4 level-recognized mjt output interrupt request 3 mjt output interrupt rgroup 3 (tio8, tio9 outputs) 2 level-recognized mjt output interrupt request 2 mjt output interrupt rgroup 2 (top0?top5 outputs) 6 level-recognized mjt output interrupt request 1 mjt output interrupt rgroup 1 (top6,top7 outputs) 2 level-recognized mjt output interrupt request 0 mjt output interrupt rgroup 0 (tio0?tio3 outputs) 4 level-recognized mjt input interrupt request 4 mjt input interrupt group 4 (tin3 input) 1 level-recognized mjt input interrupt request 3 mjt input interrupt group 3 (tin20?tin23 inputs) 4 level-recognized mjt input interrupt request 2 mjt input interrupt group 2 (tin16?tin19 inputs) 4 level-recognized mjt input interrupt request 1 mjt input interrupt group 1 (tin0 input) 1 level-recognized note 1: icu type of input source ? edge-recognized: interrupt requests are generated on a falling edge of the interrupt signal supplied to the icu. ? level-recognized: interrupt requests are generated when the interrupt signal supplied to the icu is held low. for this type of interrupt, the icu?s interrupt control register irq bit cannot be set or cleared in software. 5.3 interrupt request sources in internal peripheral i/o
5 5-12 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.4 icu vector table 5.4 icu vector table the icu vector table is used to set the start addresses of interrupt handlers for each internal peripheral i/o. the 23-source interrupt requests are assigned the following vector table addresses. table 5.4.1 icu vector table addresses interrupt request source icu vector table addresses mjt input interrupt request 4 (tin3 input) h'0000 0094 ? h'0000 0097 mjt input interrupt request 3 (tin20?23 input) h'0000 0098 ? h'0000 009b mjt input interrupt request 2 (tin16?19 input) h'0000 009c ? h'0000 009f mjt input interrupt request 1 (tin0 input) h'0000 00a0 ? h'0000 00a3 mjt output interrupt request 7 (tms0,1 output) h'0000 00a8 ? h'0000 00ab mjt output interrupt request 6 (top8,9 output) h'0000 00ac ? h'0000 00af mjt output interrupt request 5 (top10 output) h'0000 00b0 ? h'0000 00b3 mjt output interrupt request 4 (tio4?7 output) h'0000 00b4 ? h'0000 00b7 mjt output interrupt request 3 (tio8,9 output) h'0000 00b8 ? h'0000 00bb mjt output interrupt request 2 (top0?5 output) h'0000 00bc ? h'0000 00bf mjt output interrupt request 1 (top6,7 output) h'0000 00c0 ? h'0000 00c3 mjt output interrupt request 0 (tio0?3 output) h'0000 00c4 ? h'0000 00c7 dma0?4 interrupt request h'0000 00c8 ? h'0000 00cb sio1 receive interrupt request h'0000 00cc ? h'0000 00cf sio1 transmit interrupt request h'0000 00d0 ? h'0000 00d3 sio0 receive interrupt request h'0000 00d4 ? h'0000 00d7 sio0 transmit interrupt request h'0000 00d8 ? h'0000 00db a-d0 conversion interrupt request h'0000 00dc ? h'0000 00df dma5?9 interrupt request h'0000 00e8 ? h'0000 00eb sio2,3 transmit/receive interrupt request h'0000 00ec ? h'0000 00ef rtd interrupt request h'0000 00f0 ? h'0000 00f3 can0 transmit/receive & error interrupt request h'0000 010c ? h'0000 010f can1 transmit/receive & error interrupt request h'0000 0110 ? h'0000 0113
5 5-13 interrupt controller (icu) 32176 group user?s manual (rev.1.01) figure 5.5.1 example of priority resolution when accepting interrupt requests 5.5 description of interrupt operation 5.5.1 acceptance of internal peripheral i/o interrupts an interrupt request from any internal peripheral i/o is checked to see whether or not to accept by comparing its ilevel value set in the interrupt control register and the imask value of the interrupt request mask register. if its priority is higher than the imask value, the interrupt request is accepted. however, if two or more interrupt requests occur simultaneously, the interrupt controller resolves priority between these interrupt requests follow- ing the procedure described below. 1) the ilevel values set in the interrupt control registers for the respective internal peripheral i/os are compared with each other. 2) if the ilevel values are the same, priorities are resolved according to the predetermined hardware priority. 3) the ilevel and imask values are compared. if two or more interrupt requests occur simultaneously, the interrupt controller first compares their priority levels set in each interrupt control register?s ilevel bit to select an interrupt request that has the highest priority. if the interrupt requests have the same ilevel value, their priorities are resolved according to the hardware fixed priority. the interrupt request thus selected has its ilevel value compared with the imask value and if its priority is higher than the imask value, the interrupt controller sends an ei request to the cpu. interrupt requests may be masked by setting the interrupt request mask register and the interrupt control register?s ilevel bit (disabled at level 7) provided for each internal peripheral i/o and the psw register ie bit. 5.5 description of interrupt operation interrupt requested or not resolve priority according to interrupt priority level (ilevel) resolve priority according to hardware priority compare with imask value mjt input interrupt request 4 mjt output interrupt request 3 mjt output interrupt request 2 mjt output interrupt request 1 dma0-4 interrupt request a -d0 conversion interrupt request (ilevel settings) level 3 level 4 level 5 level 3 level 1 level 3 not requested requested requested requested requested requested hardware fixed priority accept interrupt if psw register ie bit = 1 level 3 level 3 level 3 can be accepted when imask = 4-7 1) 2) 3)
5 5-14 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.5 description of interrupt operation table 5.5.1 hardware fixed priority levels priority interrupt request source icu vector table address icu type of input source high mjt input interrupt request 4 (tin3 input) h'0000 0094 ? h'0000 0097 level-recognized mjt input interrupt request 3 (tin20?23 input) h'0000 0098 ? h'0000 009b level-recognized mjt input interrupt request 2 (tin16?19 input) h'0000 009c ? h'0000 009f level-recognized mjt input interrupt request 1 (tin0 input) h'0000 00a0 ? h'0000 00a3 level-recognized mjt output interrupt request 7 (tms0,1 output) h'0000 00a8 ? h'0000 00ab level-recognized mjt output interrupt request 6 (top8,9 output) h'0000 00ac ? h'0000 00af level-recognized mjt output interrupt request 5 (top10 output) h'0000 00b0 ? h'0000 00b3 edge-recognized mjt output interrupt request 4 (tio4?7 output) h'0000 00b4 ? h'0000 00b7 level-recognized mjt output interrupt request 3 (tio8,9 output) h'0000 00b8 ? h'0000 00bb level-recognized mjt output interrupt request 2 (top0?5 output) h'0000 00bc ? h'0000 00bf level-recognized mjt output interrupt request 1 (top6,7 output) h'0000 00c0 ? h'0000 00c3 level-recognized mjt output interrupt request 0 (tio0?3 output) h'0000 00c4 ? h'0000 00c7 level-recognized dma0?4 interrupt request h'0000 00c8 ? h'0000 00cb level-recognized sio1 receive interrupt request h'0000 00cc ? h'0000 00cf edge-recognized sio1 transmit interrupt request h'0000 00d0 ? h'0000 00d3 edge-recognized sio0 receive interrupt request h'0000 00d4 ? h'0000 00d7 edge-recognized sio0 transmit interrupt request h'0000 00d8 ? h'0000 00db edge-recognized a-d0 conversion interrupt request h'0000 00dc ? h'0000 00df edge-recognized dma5?9 interrupt request h'0000 00e8 ? h'0000 00eb level-recognized sio2,3 transmit/receive interrupt request h'0000 00ec ? h'0000 00ef level-recognized rtd interrupt request h'0000 00f0 ? h'0000 00f3 edge-recognized can0 transmit/receive & error interrupt h'0000 010c ? h'0000 010f level-recognized request can1 transmit/receive & error interrupt h'0000 0110 ? h'0000 0113 level-recognized low request table 5.5.2 ilevel settings and accepted imask values ilevel values set imask values at which interrupts are accepted 0 (ilevel = "000") accepted when imask is 1?7 1 (ilevel = "001") accepted when imask is 2?7 2 (ilevel = "010") accepted when imask is 3?7 3 (ilevel = "011") accepted when imask is 4?7 4 (ilevel = "100") accepted when imask is 5?7 5 (ilevel = "101") accepted when imask is 6?7 6 (ilevel = "110") accepted when imask is 7 7 (ilevel = "111") not accepted (interrupts disabled)
5 5-15 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.5.2 processing by internal peripheral i/o interrupt handlers (1) branching to the interrupt handler upon accepting an interrupt request, the cpu branches to the eit vector entry after performing the hardware preprocessing as described in section 4.3, ?eit processing procedure.? the eit vector entry for external interrupt (ei) is located at the address h?0000 0080. this address is where the instruction (not the jump address itself) for branching to the beginning of the interrupt handler routine for external interrupt requests is written. (2) processing in the external interrupt (ei) handler a typical operation of the external interrupt (ei) handler (for interrupts from internal peripheral i/o) is shown in figure 5.5.2. [1] saving each register to the stack save the bpc, psw and general-purpose registers to the stack. also, save the accumulator as neces- sary. [2] reading the interrupt request mask register (imask) and saving to the stack read the interrupt request mask register and save its content to the stack. [3] reading the interrupt vector register (ivect) read the interrupt vector register. this register holds the 16 low-order address bits of the icu vector table for the accepted interrupt request source that was stored in it when accepting an interrupt request. when the interrupt vector register is read, the following processing is automatically performed in hardware: ? the interrupt priority level of the accepted interrupt request (ilevel) is set in the imask register as a new imask value. (interrupts with lower priority levels than that of the accepted interrupt request source are masked.) ? the accepted interrupt request source is cleared (not cleared for level-recognized interrupt request sources). ? the interrupt request (ei) to the cpu core is dropped. ? the icu?s internal sequencer is activated to start internal processing (interrupt priority resolution). [4] reading and overwriting the interrupt request mask register (imask) read the interrupt request mask register and overwrite it with the read value. this write to the imask register causes the following processing to be automatically performed in hardware: ? the interrupt request (ei) to the cpu core is dropped. ? the icu?s internal sequencer is activated to start internal processing (interrupt priority resolution). note: ? processing in [4] here is unnecessary when multiple interrupts are to be enabled in [6] below. [5] reading the icu vector table read the icu vector table for the accepted interrupt request source. the relevant icu vector table address can be obtained by zero-extending the content of the interrupt vector register that was read in [3] (i.e., the 16 low-order address bits of the icu vector table for the accepted interrupt request source). the icu vector table must have set in it the start address of the interrupt handler for the interrupt request source concerned.) [6] enabling multiple interrupts to enable another higher priority interrupt while processing the accepted interrupt (i.e., enabling multiple interrupts), set the psw register ie bit to "1". [7] branching to the internal peripheral i/o interrupt handler branch to the start address of the interrupt handler that was read out in [5]. [8] processing in the internal peripheral i/o interrupt handler [9] disabling interrupts clear the psw register ie bit to "0" to disable interrupts. 5.5 description of interrupt operation
5 5-16 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.5 description of interrupt operation [10] restoring the interrupt request mask register (imask) restore the interrupt request mask register that was saved to the stack in [2]. [11] restoring registers from the stack restore the registers that were saved to the stack in [1]. [12] completion of external interrupt processing execute the rte instruction to complete the external interrupt processing. the program returns to the state in which it was before the currently processed interrupt request was accepted. (3) identifying the source of the interrupt request generated if any internal peripheral i/o has two or more interrupt request sources, check the interrupt request status register provided for each internal peripheral i/o to identify the source of the interrupt request generated. (4) enabling multiple interrupts to enable multiple interrupts in the interrupt handler, set the psw register ie (interrupt enable) bit to enable interrupt requests to be accepted. however, before writing "1" to the ie bit, be sure to save each register (bpc, psw, general-purpose registers and imask) to the stack. note: ? before enabling multiple interrupts, read the interrupt vector register (ivect) and then the icu vector table, as shown in figure 5.5.2, ?typical handler operation for interrupts from internal peripheral i/o.?
5 5-17 interrupt controller (icu) 32176 group user?s manual (rev.1.01) figure 5.5.2 typical handler operation for interrupts from internal peripheral i/o 5.5 description of interrupt operation note 1: for operations at eit acceptance and return from eit, also see section 4.3, "eit processing procedure." note 2: do not read the interrupt vector register (ivect) or write to the interrupt request mask register (imask) in the eit handler unless interrupts are disabled (psw register ie bit = 0). note 3: when multiple interrupts are disabled, execute processing in [4]. processing in [4] is unnecessary if multiple interrupts are enabled by executing processing in [6] and [9]. note 4: to enable multiple interrupts, execute processing in [6] and [9]. note 5: to reenable interrupts (by setting the ie bit to 1) after reading the interrupt vector register (ivect), perform a dummy access to the internal memory, etc. before reenabling interrupts. in the example here, there is no need to add a dummy access because the icu vector table is read after reading the ivect register. similarly, to reenable interrupts (by setting the ie bit to 1) after writing to the interrupt request mask register (imask), perform a dummy access to the internal memory, etc. before reenabling interrupts. h'0000 0080 bra instruction read interrupt vector register (ivect) read icu vector table branch to the interrupt handler for each internal peripheral i/o rte h'0080 0004 h'0000 0094 h'0000 0113 interrupt handler ei (external interrupt) handler ei (external interrupt) vector entry interrupt handler start address program being executed interrupt generated ivect save bpc to the stack save psw to the stack save general-purpose registers to the stack restore bpc from the stack restore psw from the stack restore general-purpose registers from the stack read and save interrupt request mask register (imask) to the stack imask h'0080 0000 set psw register ie bit to 1 clear psw register ie bit to 0 restore interrupt request mask register (imask) from the stack [1] [2] [3] [5] [7] [8] [9] [6] [10] [11] icu vector table (note 1) (note 1) hardware preprocessing when eit is accepted hardware postprocessing when rte instruction is executed read and overwrite interrupt request mask register (imask) [4] [12] (note 2) (note 2) (note 3) (note 4) (note 5) (note 4) (note 2) interrupt handler [1] to [12]: processing of ei by interrupt handler
5 5-18 interrupt controller (icu) 32176 group user?s manual (rev.1.01) 5.6 description of system break interrupt (sbi) operation 5.6.1 acceptance of sbi system break interrupt (sbi) is an emergency interrupt which is used when power outage is detected or a fault condition is notified by an external watchdog timer. the system break interrupt is accepted anytime upon detec- tion of a falling edge on the sbi# signal input pin no matter how the psw register ie bit is set, and cannot be masked. 5.6.2 sbi processing by handler when the system break interrupt generated has been serviced, shut down or reset the system without returning to the program that was being executed when the interrupt occurred. 5.6 description of system break interrupt (sbi) operation figure 5.6.1 typical sbi operation h'0000 0010 bra instruction sbi (system break interrupt) handler sbi (system break interrupt) vector entry program being executed sbi generated processing to shut down the system (note 1) note 1: do not return to the program that was being executed when the interrupt occurred. shut down or reset the system
chapter 6 internal memory 6.1 outline of the internal memory 6.2 internal ram 6.3 internal flash memory 6.4 registers associated with the internal flash memory 6.5 programming the internal flash memory 6.6 virtual flash emulation function 6.7 connecting to a serial programmer (csio mode) 6.8 internal flash memory protect function 6.9 precautions to be taken when rewriting the internal flash memory
6 6-2 internal memory 32176 group user?s manual (rev.1.01) 6.1 outline of the internal memory the 32176 internally contains the following types of memory: ? 24-kbyte ram ? 512-kbytes, 384-kbytes or 256-kbytes flash memory 6.2 internal ram specifications of the internal ram are shown below. table 6.2.1 specifications of the internal ram item specification size 24 kbytes location address h?0080 4000 to h?0080 9fff wait insertion operates with zero wait states internal bus connection connected by 32-bit bus dual port by using the real-time debugger (rtd), data can be read (monitored) or written to any area of the internal ram via serial communication from external devices independently of the cpu. (see chapter 14, ?real-time debugger.?) notes: ? immediately after power-on reset (for the power-on case in which vdde also goes up from gnd), the value of the ram is undefined. ? if the ram is reset during ram backup (power for only vdde is on), the ram retains the value it had immediately before being reset. 6.3 internal flash memory specifications of the internal flash memory are shown below. table 6.3.1 specifications of the internal flash memory item specification size m32176f4: 512 kbytes m32176f3: 384 kbytes m32176f2: 256 kbytes location address m32176f4: h?0000 0000 to h?0007 ffff m32176f3: h?0000 0000 to h?0005 ffff m32176f2: h?0000 0000 to h?0003 ffff wait insertion operates with zero wait state durability standard product : 100 times 10000 (10k) times rewritable : 4-kbyte block (note 2) : 10,000 (10k) times -product (note 1) : other blocks : 1,000 (1k) times internal bus connection connected by 32-bit bus other virtual flash emulation function is incorporated. (see section 6.6, ?virtual flash emulation function.?) 6.1 outline of the internal memory note 1: the 10000 (10k) times rewritable product is offered as an optional item. for details about it, please contact your nearest office of renesas or its distributor. note 2: block 1: h?0000 2000 to h?0000 2fff block 2: h?0000 3000 to h?0000 3fff
6 6-3 internal memory 32176 group user?s manual (rev.1.01) figure 6.3.1 block configuration of the m32176f4?s internal flash memory 6.3 internal flash memory h'0002 0000 8kb 8kb 32kb 64kb h'0000 7fff h'0000 8000 h'0001 ffff h'0000 5fff h'0000 ffff h'0001 0000 h'0000 4000 h'0000 6000 64kb h'0002 ffff 64kb 64kb 64kb 64kb 64kb h'0003 0000 h'0003 ffff h'0004 0000 h'0004 ffff h'0005 0000 h'0005 ffff h'0006 0000 h'0006 ffff h'0007 0000 h'0007 ffff h'0000 0000 h'0000 1fff 8kb 4kb 4kb h'0000 2000 h'0000 2fff h'0000 3000 h'0000 3fff block 0 internal flash memory area of the m32176f4 (512 kbytes) unequal blocks equal blocks block 2 block 1 block 12 block 11 block 10 block 9 block 8 block 7 block 6 block 5 block 4 block 3
6 6-4 internal memory 32176 group user?s manual (rev.1.01) figure 6.3.2 block configuration of the m32176f3?s internal flash memory h'0002 0000 8kb 8kb 32kb 64kb h'0000 7fff h'0000 8000 h'0001 ffff h'0000 5fff h'0000 ffff h'0001 0000 h'0000 4000 h'0000 6000 64kb h'0002 ffff 64kb 64kb 64kb h'0003 0000 h'0003 ffff h'0004 0000 h'0004 ffff h'0005 0000 h'0005 ffff h'0000 0000 h'0000 1fff 8kb 4kb 4kb h'0000 2000 h'0000 2fff h'0000 3000 h'0000 3fff block 0 internal flash memory area of the m32176f3 (384 kbytes) unequal blocks equal blocks block 2 block 1 block 10 block 9 block 8 block 7 block 6 block 5 block 4 block 3 6.3 internal flash memory
6 6-5 internal memory 32176 group user?s manual (rev.1.01) figure 6.3.3 block configuration of the m32176f2?s internal flash memory h'0002 0000 8kb 8kb 32kb 64kb h'0000 7fff h'0000 8000 h'0001 ffff h'0000 5fff h'0000 ffff h'0001 0000 h'0000 4000 h'0000 6000 64kb h'0002 ffff 64kb h'0003 0000 h'0003 ffff h'0000 0000 h'0000 1fff 8kb 4kb 4kb h'0000 2000 h'0000 2fff h'0000 3000 h'0000 3fff block 0 internal flash memory area of the m32176f2 (256 kbytes) unequal blocks equal blocks block 2 block 1 block 8 block 7 block 6 block 5 block 4 block 3 6.3 internal flash memory
6 6-6 internal memory 32176 group user?s manual (rev.1.01) 6.4 registers associated with the internal flash memory 6.4 registers associated with the internal flash memory a register map associated with the internal flash memory is shown below. internal flash memory related register map address +0 address +1 address see pages b0 b7 b8 b15 h'0080 07e0 flash mode register flash status register 6-7 (fmod) (fstat) 6-8 h'0080 07e2 flash control register 1 flash control register 2 6-9 (fcnt1) (fcnt2) 6-10 h'0080 07e4 flash control register 3 flash control register 4 6-11 (fcnt3) (fcnt4) 6-13 h'0080 07e6 (use inhibited area) h'0080 07e8 virtual flash l bank register 0 6-15 (felbank0) h'0080 07ea virtual flash l bank register 1 6-15 (felbank1) (use inhibited area) h'0080 07f0 virtual flash s bank register 0 6-16 (fesbank0) h'0080 07f2 virtual flash s bank register 1 6-16 (fesbank1) |
6 6-7 internal memory 32176 group user?s manual (rev.1.01) 6.4.1 flash mode register flash mode register (fmod) b bit name function r w 0?2 no function assigned. fix to "0" 00 3 faens 0: flash access disabled r ? flash access enable status bit 1: flash access enabled 4?6 no function assigned. fix to "0" 00 7 fpmod 0: fp pin = "low" r ? external fp pin status bit 1: fp pin = "high" (1) faens (flash access enable status) bit (bit 3) the faens bit shows whether access to the flash memory is enabled or disabled. when the flash memory is reset by the freset bit in flash control register 4 (fcnt4) or accessed for programming/erasure, this bit is cleared to "0", resulting in the flash memory being disabled against access. when the flash memory becomes ready for access, this bit is set to "1". (2) fpmod (external fp pin status) bit (bit 7) the fpmod is a status bit which indicates the fp (flash protect) pin status. the internal flash memory is enabled for programming or erase operation only when fpmod = "1", and is protected against programming or erase operation when fpmod = "0". b0123456b7 faens fpmod 0001000? 6.4 registers associated with the internal flash memory
6 6-8 internal memory 32176 group user?s manual (rev.1.01) 6.4 registers associated with the internal flash memory 6.4.2 flash status register flash status register (fstat) b bit name function r w 8 fbusy 0: being programmed or erased r ? flash busy bit 1: ready state 9 no function assigned. fix to "0". 00 10 erase 0: erase normally operating or teminated r ? erase status confirmation bit 1: erase error occurred 11 wrerr 0: programming normally operating or terminated r ? write status confirmation bit 1: programming error occurred 12 no function assigned. fix to "0". 00 13 fesq1 ?? reserved bit 14 fesq2 ?? reserved bit 15 no function assigned. fix to "0". 00 flash status register (fstat) consists of the following status bits that indicate the operation condition of the flash memory. (1) fbusy (flash busy) bit (bit 8) the fbusy bit is used to determine whether the operation on the flash memory is finished when it is being programmed or erased. when fbusy = "0", it means that the programming or erase operation is being executed; when fbusy = "1", the operation is finished. (2) erase (erase status confirmation) bit (bit 10) the erase bit is used to determine after execution of processing whether the erase operation performed on the flash memory resulted in an error. when erase = "0", it means that the erase operation terminated normally; when erase = "1", the erase operation terminated in an error. also, this bit is set to "1" when invalid command is issued. (3) wrerr (write status confirmation) bit (bit 11) the wrerr bit is used to determine after completion of processing whether the programming operation performed on the flash memory resulted in an error. when wrerr = "0", it means that the programming operation terminated normally; when wrerr = "1", the programming operation terminated in an error. also, this bit is set to "1" when invalid command is issued. note: ? except when programming/erase processing on the flash memory is forcibly terminated, do not manipulate the freset bit in flash control register 4 (fcnt4) while the fbusy bit = "0" (programming/erasure in progress). b8 9 1011121314b15 fbusy erase wrerr fesq1 fesq2 10000000
6 6-9 internal memory 32176 group user?s manual (rev.1.01) 6.4 registers associated with the internal flash memory 6.4.3 flash control registers flash control register 1 (fcnt1) b bit name function r w 0?2 no function assigned. fix to "0". 00 3 fentry 0: normal read r w flash e/w enable mode entry bit 1: program/erase enable 4?6 no function assigned. fix to "0". 00 7 femmod 0: normal mode r w virtual flash emulation mode bit 1: virtual flash emulation mode flash control register 1 (fcnt1) consists of the following two bits to control the internal flash memory. (1) fentry (flash e/w enable mode entry) bit (bit 3) the fentry bit controls entry to flash e/w enable mode. flash e/w enable mode can only be entered when fentry = "1". to set the fentry bit to "1", write "0" and then "1" to the fentry bit in succession while the fp pin = "high". to clear the fentry bit, check to see that the flash status register (fstat) fbusy bit = "1" (ready) and then write "0" to the fentry bit. note that the following operations cannot be performed while programming or erasing the internal flash memory (fstat fbusy bit = "0"). if one of these operations is attempted, the fentry bit is cleared to "0" in hardware. 1) writing "0" to the fentry bit 2) entering a low-level signal to the fp pin 3) entering a low-level signal to the reset# pin when running a program resident in the internal flash memory while the fentry bit = "0", the ei vector entry is located at the address h?0000 0080 of the internal flash memory. when running the flash write/erase program in the ram while the fentry bit = "1", the ei vector entry is located at the address h?0080 4000 of the ram, allowing the flash programming/erase operation to be controlled using interrupts. table 6.4.1 changes of the ei vector entry by fentry fentry ei vector entry address 0 internal flash memory area h'0000 0080 1 internal ram area h'0080 4000 (2) femmod (virtual flash emulation mode) bit (bit 7) the femmod bit controls entry to virtual flash emulation mode. virtual flash emulation mode is entered by setting the femmod bit to "1" while the fentry bit = "0". (for details, see section 6.6, ?virtual flash emulation function.?) b0123456b7 fentry femmod 00000000
6 6-10 internal memory 32176 group user?s manual (rev.1.01) 6.4 registers associated with the internal flash memory flash control register 2 (fcnt2) b bit name function r w 8?10 no function assigned. fix to "0". 00 11 flocks 0: memory area read mode r (note 1) lock bit read mode select bit 1: register read mode 12?14 no function assigned. fix to "0". 00 15 fprot 0: protection by lock bit effective r (note 1) lock bit protect control bit 1: protection by lock bit invalidated note 1: it can be accessed for write only during the flash e/w entry mode (fentry bit = "1"). (1) flocks (lock bit read mode select) bit (bit 11) the flocks bit is used to select a method for reading out the lock bit status. when the flocks bit = "0", the internal flash memory is placed in memory area read mode, so that it is possible to inspect the lock bit status by issuing command data h?7171 to any address of the flash memory and then reading the last even address of the target block. when the flocks bit = "1", the internal flash memory is placed in register read mode, so that it is possible to inspect the lock bit status by first issuing command data h?7171 and h?d0d0 to any address of the target block in succession and then, when the fbusy bit is set to "1", by reading the flockst bit in flash control register 4. the flocks bit can only be accessed for write when the fentry bit = "1". if one of the following operations is attempted, the flocks bit is cleared to "0". 1) writing "0" to the flocks bit 2) entering a low-level signal to the fp pin 3) clearing the fentry bit to "0" 4) entering a low-level signal to the reset# pin (2) fprot (lock bit protect control) bit (bit 15) the fprot bit controls invalidation of the internal flash memory protection by a lock bit (protection against programming/erase operation). protection of the internal flash memory is invalidated by setting the fprot bit to "1", so that any blocks protected by a lock bit can now be programmed or erased. to set the fprot bit to "1", write "0" and then "1" to the fprot bit in succession while the fentry bit = "1". to clear the fprot bit to "0", write "0" to the fprot bit. if one of the following operations is attempted, the fprot bit is cleared to "0". 1) writing "0" to the fprot bit 2) entering a low-level signal to the fp pin 3) clearing the fentry bit to "0" 4) entering a low-level signal to the reset# pin b8 9 1011121314b15 flocks fprot 00000000
6 6-11 internal memory 32176 group user?s manual (rev.1.01) fprot = 0 fentry = 1 yes no fentry = 1 fprot = 1 fprot is not set to 1 if a write cycle to any other area occurs during this time. fpro t = 0 fpro t = 1 figure 6.4.1 protection unlocking flow flash control register 3 (fcnt3) b bit name function r w 0?2 no function assigned. fix to "0". 00 3 fbsyck 0: command accepted normally r ? busy check bit 1: command not accepted normally 4?6 no function assigned. fix to "0". 00 7 fpbsyck 0: command accepted normally r ? prebusy check bit 1: command not accepted normally flash control register 3 (fcnt3) is used when developing an internal flash memory write/erase program to check whether commands have been accepted normally. this register does not need to be used for a program that has been verified to be able to operate properly. (1) fbsyck (busy check) bit (bit 3) the fbsyck bit is used to check whether a 2-cycle command (confirmation command h?d0d0 or a command that requires write data) issued to the flash memory during flash e/w enable mode has been accepted normally. if the fbsyck bit is found to be "0" after issuing a command in the second cycle (confirmation command h?d0d0 or write data), it means that the command in the second cycle has been accepted normally. conversely, if the fbsyck bit is found to be "1", it means that the command in the second cycle has not been accepted normally. in addition to the above, the fbsyck bit is set to "1" in the following cases: 1) when a command in the first cycle of 2-cycle commands has been accepted 2) when the freset bit = "1" 3) when input on reset# pin is pulled low b0123456b7 fbsyck fpbsyck 00010001 6.4 registers associated with the internal flash memory
6 6-12 internal memory 32176 group user?s manual (rev.1.01) 6.4 registers associated with the internal flash memory (2) fpbsyck (prebusy check) bit (bit 7) the fpbsyck bit is used to check whether a 2-cycle command (confirmation command h?d0d0 or a com- mand that requires write data) issued to the flash memory during flash e/w enable mode has been accepted normally. if the fpbsyck bit is found to be "0" after issuing a command in the first cycle, it means that the command in the first cycle has been accepted normally. conversely, if the fpbsyck bit is found to be "1", it means that the command in the first cycle has not been accepted normally. in addition to the above, the fpbsyck bit is set to "1" in the following cases: 1) when in a ready state (fbusy = high after a command in the second cycle has been accepted) 2) when the clear status register command is issued 3) when the freset bit = "1" 4) when input on reset# pin is pulled low end check fstat for program error start write a first-cycle command fbusy = "1" time out ? yes no processing forcibly terminated yes no fpbsyck = "0" yes write a second-cycle command or data operation starts fbsyck = "0" yes write the clear status register command h'5050 no no figure 6.4.2 method to confirm the command acceptance by checking fcnt3
6 6-13 internal memory 32176 group user?s manual (rev.1.01) b8 9 1011121314b15 flockst freset 00000000 flash control register 4 (fcnt4) b bit name function r w 8?10 no function assigned. fix to "0". 00 11 flockst 0: protected r ? lock bit status bit 1: unprotected 12?14 no function assigned. fix to "0". 00 15 freset 0: no operation r w flash reset bit 1: reset (1) flockst (lock bit status) bit (bit 11) the flockst bit is used to read the lock bit status. if the flockst bit = "0", it means that the relevant memory block is protected. if the flockst bit = "1", it means that the relevant memory block is not protected. confirmation of the lock bit status by the flockst bit is possible when the flocks bit = "1". in this case, the lock bit status can be checked by first issuing command data h?7171 and h?d0d0 to any address of the target block in succession and then, when the fbusy bit is set to "1", by reading the flockst bit. (2) freset (flash reset) bit (bit 15) the freset bit controls forcible termination of the internal flash memory programming/erase operation, initial- ization (to h?80) of each status bit in the flash status register (fstat), and initialization of the fpbsyck bit in flash control register 3 (fcnt3). setting the freset bit to "1" forcibly terminates programming/erase operation and initializes each status bit in the fstat (to h?80) and the fpbsyck bit in fcnt3. make sure freset is held high (= "1") for at least 10 s during a flash reset. after a flash reset, the internal flash memory is disabled against access until the faens bit is set to "1". the freset bit is effective only when the fentry bit = "1". unless the fentry bit = "1", settings made to the freset bit are ignored. make sure the freset bit = "0" while programming or erasing the flash memory. 6.4 registers associated with the internal flash memory
6 6-14 internal memory 32176 group user?s manual (rev.1.01) figure 6.4.3 example of freset bit 1 (initializing flash status register 2) 6.4 registers associated with the internal flash memory figure 6.4.4 example of freset bit 2 (forcibly terminating programming/erasing operation) yes no 10s wait (by hardware timer or software timer) fmod register faens = 1? yes no freset = 1 fentry = 1 program/erase the flash memory error found freset = 0 program/erase the flash memory fentry = 0 programming/erase operation terminated normally yes no freset = 1 freset = 0 forcibly terminate flash programming/erase operation has timed ou t 10s wait (by hardware timer or software timer) fmod register faens = 1?
6 6-15 internal memory 32176 group user?s manual (rev.1.01) 6.4.4 virtual flash l bank registers virtual flash l bank register 0 (felbank0) virtual flash l bank register 1 (felbank1) b bit name function r w 0 modenl 0: disable virtual flash emulation function r w virtual flash emulation l enable bit 1: enable virtual flash emulation function 1?7 no function assigned. fix to "0". 00 8?14 lbankad start address a12?a18 of the relevant l bank r w l bank address bit 15 no function assigned. fix to "0". 00 note: ? these registers must always be accessed in halfwords. (1) modenl (virtual flash emulation l enable) bit (bit 0) the modenl bit can be set to "1" after entering virtual flash emulation mode (by setting the femmod bit to "1" while the fentry bit = "0"). this causes the virtual flash emulation function to be enabled for the l bank area selected by the lbankad bits. (2) lbankad (l bank address) bits (bits 8?14) the lbankad bits are provided for selecting one of the l banks that are separated every 8 kb. use these lbankad bits to set the seven bits a12?a18 of the 32-bit start address of the desired l bank. note: ? for details, see section 6.6, ?virtual flash emulation function.? 6.4 registers associated with the internal flash memory b01234567891011121314b15 lbankad 000000000000000 mod enl 0
6 6-16 internal memory 32176 group user?s manual (rev.1.01) 6.4.5 virtual flash s bank registers virtual flash s bank register 0 (fesbank0) virtual flash s bank register 1 (fesbank1) b bit name function r w 0 modens 0: disable virtual flash emulation function r w virtual flash emulation s enable bit 1: enable virtual flash emulation function 1?7 no function assigned. fix to "0". 00 8?15 sbankad start address a12?a19 of the relevant s bank r w s bank address bit note: ? these registers must always be accessed in halfwords. (1) modens (virtual flash emulation s enable) bit (bit 0) the modens bit can be set to "1" after entering virtual flash emulation mode (by setting the femmod bit to "1" while the fentry bit = "0"). this causes the virtual flash emulation function to be enabled for the s bank area selected by the sbankad bits. (2) sbankad (s bank address) bits (bits 8?15) the sbankad bits are provided for selecting one of the s banks that are separated every 4 kb. use these sbankad bits to set the eight bits a12?a19 of the 32-bit start address of the desired s bank. note: ? for details, see section 6.6, ?virtual flash emulation function.? b01234567891011121314b15 sbankad 000000000000000 mod ens 0 6.4 registers associated with the internal flash memory
6 6-17 internal memory 32176 group user?s manual (rev.1.01) 6.5 programming the internal flash memory 6.5 programming the internal flash memory 6.5.1 outline of internal flash memory programming to program or erase the internal flash memory, there are following two methods to choose depending on the situation: (1) when the flash write/erase program does not exist in the internal flash memory (2) when the flash write/erase program already exists in the internal flash memory for (1), set the fp pin = "high", mod0 = "high" and mod1 = "low" to enter boot mode. in this case, the cpu starts running the boot program immediately after reset. the boot program transfers the flash write/erase program into the internal ram. after the transfer, jump to a location in the ram and use the ram-resident program to set the flash control register 1 (fcnt1) fentry bit to "1" to make the internal flash memory ready for programming/erase operation (i.e., placed in boot mode + flash e/w enable mode). when the above is done, use the flash write/erase program that has been transferred into the internal ram to program or erase the internal flash memory. for (2), set the fp pin = "high", mod0 = "low" and mod1 = "low" to enter single-chip mode. transfer the flash write/erase program from the internal flash memory in which it has been prepared into the internal ram. after the transfer, jump to the ram and use the program transferred into the ram to set the flash control register 1 (fcnt1) fentry bit to "1" to make the internal flash memory ready for programming/erase operation (i.e., placed in single-chip mode + flash e/w enable mode). when the above is done, use the flash write/erase program that has been transferred into the internal ram to program or erase the internal flash memory. or flash e/w enable mode can be entered from external extension mode by setting the fp pin = "high", mod0 = "low" and mod1 = "high". during flash e/w enable mode (fp pin = 1, fentry = 1), the eit vector entry for external interrupt (ei) is relocated to the start address (h?0080 4000) of the internal ram. during normal mode, it is located in the flash area (h?0000 0080). to use an external interrupt (ei) in flash e/w enable mode, write at the beginning of the internal ram an instruc- tion for branching to the external interrupt (ei) handler that has been transferred into the internal ram. further- more, because the ivect register which is read out in the external interrupt (ei) handler has stored in it the flash memory address of the icu vector table, make sure the icu vector table to be used during flash e/w enable mode is prepared in the internal ram so that the value of the ivect register will be converted into the internal ram address of the icu vector table (for example, by adding an offset) before performing branch processing.
6 6-18 internal memory 32176 group user?s manual (rev.1.01) ei vector entry (h'0000 0080) internal rom area internal ram h'0000 0000 h'00ff ffff h'0080 4000 internal rom area internal ram h'0080 3fff flash e/w enable mode (fentry = 1) normal mode (fentry = 0) h'0000 0000 h'0080 3fff ei vector entry (h'0080 4000) h'0080 4000 h'00ff ffff figure 6.5.1 ei vector entry during flash e/w enable mode 6.5 programming the internal flash memory
6 6-19 internal memory 32176 group user?s manual (rev.1.01) figure 6.5.2 procedure for programming/erasing the internal flash memory (when the flash write/erase program does not exist in it) (1) when the flash write/erase program does not exist in the internal flash memory in this case, the boot program is used to program or erase the internal flash memory. to transfer the write data, use serial i/o1 in clock-synchronized serial mode. to program or erase the internal flash memory using a flash programmer, follow the procedure described below. sio1 cpu sio1 cpu flash write/ erase program mod1 = l sio1 cpu ram flash memory fp = l or h ram ram  initial state (flash write/erase program nonexistent in the internal flash memory)  set the fp pin high, mod0 pin high and mod1 pin low to place the flash memory in boot mode + flash e/w enable mod e  deassert reset signal and start up with the boot program.  transfer the flash write/erase program into the ram.  jump to the flash write/erase program in the ram.  using the flash write/erase program in the ram, set the flash control register 1 (fcnt1) fentry bit to 1.  program or erase the internal flash memory using the flash write/erase program.  when finished, set the mod0 low and jump to the internal flash memory or apply a reset to enter normal mode. m32r/ecu m32r/ecu m32r/ecu external device (e.g., flash programmer) external device (e.g., flash programmer) flash memory flash write data flash memory mod0 = l boot program boot program boot program mod1 = l fp = h mod0 = h mod1 = l fp = h mod0 = h reset# = l reset# = h reset# = h flash write/ erase program write data write data write data external device (e.g., flash programmer) 6.5 programming the internal flash memory
6 6-20 internal memory 32176 group user?s manual (rev.1.01) reset# pin mod0 pin fentry bit fp pin mod1 pin power on mode selected reset signal deasserted (boot program starts) mode selected reset signal deasserted flash programming/erasing by the boot program settings by the boot program figure 6.5.3 internal flash memory write/erase timing (when the flash write/erase program does not exist in it) 6.5 programming the internal flash memory
6 6-21 internal memory 32176 group user?s manual (rev.1.01) figure 6.5.4 procedure for programming/erasing the internal flash memory (when the flash write/erase program already exists in it) (2) when the flash write/erase program already exists in the internal flash memory in this case, the flash write/erase program prepared in the internal flash memory is used to program or erase the internal flash memory. for programming/erase operation here, use the internal peripheral circuits in the manner suitable for the programming system. (all resources of the internal peripheral circuits such as the data bus, serial i/o and ports can be used.) the following shows an example for programming or erasing the internal flash memory by using serial i/o0 in single-chip mode. sio0 cpu flash write/ erase program sio0 cpu flash write/ erase program mod1 = l sio0 cpu ram flash write/ erase program fp = l or h write data ram ram  initial state (flash write/erase program existing in the internal flash memory)  an ordinary program in the internal flash memory is being executed.  set the fp pin high, mod1 pin low and mod0 pin low to place the flash memory in single-chip + flash e/w enable mode.  after determining the fp pin and mod1 pin levels, transfer the flash write/erase program from the internal flash memory area into the ram.  jump to the flash write/erase program in the ram.  using the flash write/erase program in the ram, set the flash control register 1 (fcnt1) fentry bit to 1.  program or erase the internal flash memory using the flash write/erase program in the ram.  when finished, jump to the program in the flash memory or apply a reset to enter normal mode. m32r/ecu m32r/ecu m32r/ecu external device external device external device flash memory flash write data flash memory mod0 = l mod1 = l fp = h mod0 = l mod1 = l fp = h mod0 = l write data write data 6.5 programming the internal flash memory
6 6-22 internal memory 32176 group user?s manual (rev.1.01) reset# pin mod0 pin fentry bit fp pin high or low high or low (single-chip or external extension) mod1 pin low high or low flash programming/erasing by the flash write/erase program flash rewrite starts flash mode turned on flash mode turned off flash write/erase program transferred into the ram figure 6 .5.5 internal flash memory write/erase timing (when the flash write/erase program already exists in it) 6.5 programming the internal flash memory
6 6-23 internal memory 32176 group user?s manual (rev.1.01) 6.5.2 controlling operation modes during flash programming the microcomputer?s operation mode is set by mod0, mod1 and flash control register 1 (fcnt1) fentry bit. the table below lists operation modes that may be used when programming or erasing the internal flash memory. table 6.5.1 operation modes set during flash programming/erase fp mod0 mod1 fentry (note 1) operation mode reset vector entry ei vector entry 0 0 0 0 single-chip mode start address of internal flash area 1 0 0 0 flash memory (h'0000 0080) (h'0000 0000) 0 1 0 0 processor mode start address of external external area area (h'0000 0000) (h'0000 0080) 0 0 1 0 external extension start address of internal flash area 1 0 1 0 mode flash memory (h'0000 0080) (h'0000 0000) 1 0 0 1 single-chip mode start address of internal beginning of internal ram + flash e/w enable flash memory (h'0080 4000) (h'0000 0000) 1 1 0 0 boot mode boot program startup flash area address (h'0000 0080) 1 1 0 1 boot mode + flash boot program startup beginning of internal ram e/w enable address (h'0080 4000) 1 0 1 1 external extension start address of internal beginning of internal ram mode + flash e/w flash memory (h'0080 4000) enable (h'0000 0000) ? 1 1 ? use inhibited ? ? note 1: indicates the flash control register 1 (fcnt1) fentry bit status (? denotes ?don?t care?). however, if fp = "0", writing "1" to fentry only results in it cleared to "0". note 2: always make sure the mod2 pin is connected low (= 0) to ground (gnd). 6.5 programming the internal flash memory
6 6-24 internal memory 32176 group user?s manual (rev.1.01) 6.5 programming the internal flash memory (1) flash e/w enable mode flash e/w enable mode is a mode in which the internal flash memory can be programmed or erased. in flash e/w enable mode, no programs can be executed in the internal flash memory. therefore, the necessary program must be transferred into the internal ram before entering flash e/w enable mode, so that it can be executed in the ram. (2) entering flash e/w enable mode flash e/w enable mode can only be entered when operating in single-chip, external extension or boot mode. furthermore, it is only when the fp pin = "high" and the flash control register 1 (fcnt1) fentry bit = "1" that flash e/w enable mode can be entered. flash e/w enable mode cannot be entered when operating in processor mode or the fp pin = "low". (3) detecting the mod0 and mod1 pin levels the mod0 and mod1 pin levels ("high" or "low") can be known by checking the p8 data register (port data register, h?0080 0708) mod0dt and mod1dt bits. p8 data register (p8data) 123456b7 b0 p87dt p86dt p85dt p84dt p83dt p82dt mod1dt mod0dt ???????? b bit name function r w 0 mod0dt 0: mod0 pin = "low" r ? mod0 data bit 1: mod0 pin = "high" 1 mod1dt 0: mod1 pin = "low" r ? mod1 data bit 1: mod1 pin = "high" 2 p82dt at read r w port p82 data bit depends on how the port direction register is set 3 p83dt ? if direction bit = "0" (input mode) port p83 data bit 0: port input pin = "low" 4 p84dt 1: port input pin = "high" port p84 data bit ? if direction bit = "1" (output mode) (note 1) 5 p85dt 0: port output latch = "0" / port pin level = "low" port p85 data bit 1: port output latch = "1" / port pin level = "high" 6 p86dt at write port p86 data bit write to the port output latch 7 p87dt port p87 data bit note 1: to select the port data to read, use the port input special function control register?s port input data select bit (pis el).
6 6-25 internal memory 32176 group user?s manual (rev.1.01) figure 6.5.6 procedure for entering flash e/w enable mode end start enter one of the following modes:  single-chip mode  boot mode  external extension mode transfer the flash write/erase program into the internal ram set the flash control register in sfr area (fcnt1, h'0080 07e2) fentry bit to 0 set the flash control register in sfr area (fcnt1, h'0080 07e2) fentry bit to 1 execute flash write/erase command and various read commands (note 1) switched to the flash write/erase program wait for 1 s (using a hardware or software timer) jump to the flash memory or apply reset switched to normal mode check mod0/1 and fp pin levels ok no end fmod(h'0080 07e0) fpmod p8data(h'0080 0708) b0 = mod0dt b1 = mod1dt note 1: for details about each command, see section 6.5.3, "procedure for programming/erasing the internal flash memory." go to flash e/w enable mode 6.5 programming the internal flash memory
6 6-26 internal memory 32176 group user?s manual (rev.1.01) 6.5.3 procedure for programming/erasing the internal flash memory to program or erase the internal flash memory, set up chip mode to enter flash e/w enable mode and execute the flash write/erase program in the internal ram into which it has been transferred from the internal flash memory. in flash e/w enable mode, because the internal flash memory cannot be accessed for read as in normal mode, no programs present in it can be executed. therefore, the flash write/erase program must be made available in the internal ram before entering flash e/w enable mode. (once flash e/w enable mode is entered into, only flash command and no other commands can be used to access the internal flash memory.) to access the internal flash memory in flash e/w enable mode, issue commands for the internal flash memory address to be operated on. the table below lists the commands that can be issued in flash e/w enable mode. note: ? during flash e/w enable mode, the internal flash memory cannot be accessed for read or write wordwise. table 6.5.2 commands in flash e/w enable mode command name issued command data read array command h'ffff halfword program command h'4040 lock bit program command h'7777 block erase command h'2020 clear status register command h'5050 read lock bit status command h'7171 verify command (note 1) h'd0d0 note 1: ? this command must be issued immediately after the lock bit program, block erase or read lock bit status command. if the lock bit program, block erase or read lock bit status command is followed by other than the verify (h'd0d0) command, the lock bit program, block erase or read lock bit status command is not executed normally and terminated in error. (1) read array command writing the read array command (h?ffff) to any address of the internal flash memory places it in read mode. then read the desired flash memory address, and the content of that address will be read out. before exiting flash e/w enable mode, always be sure to execute the read array command. 6.5 programming the internal flash memory start write the read array command (h'ffff) to any address of the internal flash memory read the desired flash memory address end figure 6.5.7 read array
6 6-27 internal memory 32176 group user?s manual (rev.1.01) 6.5 programming the internal flash memory end confirm the result of execution of the programming process (note 1) last address? yes no start write the program data to the internal flash memory address to be programmed write the halfword program command (h'4040) to any address of the internal flash memory internal flash memory is programmed by halfword program wait for 1 s (using a hardware or software timer) fbusy bit = 1 time out? 600 s yes no forcibly terminated yes no to next halfword note 1: check flash status register (fstat) erase bit (for the erase status) and wrerr bit (for the write status). figure 6.5.8 halfword program (2) halfword program command the internal flash memory is programmed a halfword at a time, each halfword consisting of 2 bytes. to program the flash memory, write the program command (h?4040) to any address of the internal flash memory and then the program data to the address to be programmed. the protected flash memory blocks cannot be accessed for write by the halfword program command. halfword programming is automatically performed by the internal control circuit, and whether the halfword program command has finished can be known by checking the flash status register fbusy bit. (see section 6.4.2, ?flash status registers.?) while the fbusy bit = "0", the next programming cannot be per- formed.
6 6-28 internal memory 32176 group user?s manual (rev.1.01) 6.5 programming the internal flash memory (3) lock bit program command the internal flash memory can be protected against programming/erase operation one block at a time. the lock bit program command is provided for protecting the flash memory blocks. write the lock bit program command (h?7777) to any address of the internal flash memory. next, write the verify command (h?d0d0) to the last even address of the flash memory block to be protected, and this memory block is thereby protected against programming/erase operation. to remove protection, use the flash control register 2 (fcnt2) fprot bit to invalidate protection by a lock bit (see section 6.4.3, ?flash control registers?) and erase the flash memory block whose protection is to be removed. (the content of that memory block is also erased.) lock bit programming is automatically performed by the internal control circuit, and whether the lock bit program command has finished can be known by checking the flash status register (fstat) fbusy bit. (see section 6.4.2, ?flash status registers.?) while the fbusy bit = "0", the next programming cannot be performed. the table below lists the target flash memory blocks and their addresses to be specified when writing the verify command data. table 6.5.3 m32176f4 target blocks and specified addresses target block specified address 0 h'0000 1ffe 1 h'0000 2ffe 2 h'0000 3ffe 3 h'0000 5ffe 4 h'0000 7ffe 5 h'0000 fffe 6 h'0001 fffe 7 h'0002 fffe 8 h'0003 fffe 9 h'0004 fffe 10 h'0005 fffe 11 h'0006 fffe 12 h'0007 fffe table 6.5.4 m32176f3 target blocks and specified addresses target block specified address 0 h'0000 1ffe 1 h'0000 2ffe 2 h'0000 3ffe 3 h'0000 5ffe 4 h'0000 7ffe 5 h'0000 fffe 6 h'0001 fffe 7 h'0002 fffe 8 h'0003 fffe 9 h'0004 fffe 10 h'0005 fffe
6 6-29 internal memory 32176 group user?s manual (rev.1.01) end start write the verify command (h'd0d0) to the last even address of the flash memory block to be protected write the lock bit program command (h'7777) to any address of the internal flash memory lock bit is programmed by lock bit program wait for 1 s (using a hardware or software timer) fbusy bit = 1 time out? yes no forcibly terminated yes no confirm the result of execution of the programming process (note 1) note 1: check flash status register (fstat) erase bit (for the erase status) and wrerr bit (for the write status). 600 s figure 6.5.9 lock bit program 6.5 programming the internal flash memory table 6.5.5 m32176f2 target blocks and specified addresses target block specified address 0 h'0000 1ffe 1 h'0000 2ffe 2 h'0000 3ffe 3 h'0000 5ffe 4 h'0000 7ffe 5 h'0000 fffe 6 h'0001 fffe 7 h'0002 fffe 8 h'0003 fffe
6 6-30 internal memory 32176 group user?s manual (rev.1.01) end start write the verify command (h'd0d0) to the last even address of the flash memory block to be erased write the block erase command (h'2020) to any address of the internal flash memory internal flash memory contents are erased by the block erase command wait for 1 s (using a hardware or software timer) time out? yes no forcibly terminated yes no confirm the result of execution of the erase process (note 1) fbusy bit = 1 8 s note 1: check flash status register (fstat) erase bit (for the erase status) and wrerr bit (for the write status). figure 6.5.10 block erase 6.5 programming the internal flash memory (4) block erase command the block erase command erases the content of the internal flash memory one block at a time. to perform this operation, write the command data (h?2020) to any address of the internal flash memory. next, write the verify command (h?d0d0) to the last even address of the flash memory block to be erased (see tables 6.5.3, 6.5.4 and 6.5.5, ?m32176 target blocks and specified addresses?). the protected flash memory blocks cannot be erased by the block erase command. block erase operation is automatically performed by the internal control circuit, and whether the block erase command has finished can be known by checking the flash status register (fstat) fbusy bit. (see section 6.4.2, ?flash status registers.?) while the fbusy bit = "0", the next block erase operation cannot be performed.
6 6-31 internal memory 32176 group user?s manual (rev.1.01) 6.5 programming the internal flash memory (7) clear status register command the clear status register command clears the flash status register (fstat) erase (erase status), and wrerr (write status) bits to "0". write the command data (h?5050) to any address of the internal flash memory, and flash status register is thereby initialized. also, issue the clear status register command, and flash status register 3 (fcnt3) is initialized. if an error occurs when programming or erasing the flash memory and the flash status register (fstat) erase (erase status) or wrerr (write status) bit is set to "1", the next programming or erase operation cannot be executed unless each status bit is cleared to "0". start write the clear status register command (h'5050) to any address of the internal flash memory end figure 6.5.11 clear status register
6 6-32 internal memory 32176 group user?s manual (rev.1.01) b01234567891011121314b15 flbst ? ??????????????? 6.5 programming the internal flash memory start write the read lock bit status command (h'7171) to any address of the internal flash memory read the last even address of the flash memory block to be checked end figure 6.5.12 read lock bit status (memory area read mode) (8) read lock bit status command the read lock bit status command is provided for checking whether a flash memory block is protected against programming/erase operation. the method for reading lock bit can be chosen from the following depends on the setting for flash control register 2 (fcnt2) flocks (lock bit read mode select) bit. 1) memory area read mode (flocks bit = 0) write the command data (h?7171) to any address of the internal flash memory. next, read the last even address of the flash memory block to be checked (see tables 6.5.3, 6.5.4 and 6.5.5, ?m32176 target blocks and specified addresses?), and the read data shows whether the target block is protected. if the flbst (lock bit) in the read data is "0", it means that the target memory block is protected. if the flbst (lock bit) is "1", it means that the target memory block is not protected. lock bit status register (flbst) b bit name function r w 0?8 no function assigned. ?0 9 flbst 0: protected r ? lock bit 1: not protected 10?15 no function assigned. ? 0 the lock bit status register is a read-only register, which is included for each memory block independently of one another. to read this register, flash control register 2 (fcnt2) flocks bit must be set to "0".
6 6-33 internal memory 32176 group user?s manual (rev.1.01) 6.5 programming the internal flash memory 2) register read mode (flocks bit = 1) write the command data (h?7171) to any address of the target block. next, write the verify command data (h'd0d0), and the flash control register 4 (fcnt4) flockst (lock bit status) bit shows whether the target block is protected. end start write the verify command (h'd0d0) to any address of the block write the read lock bit status command (h'7171) to any address of the block to be read time out? yes no forcibly terminated yes no confirm the lock bit status bit (note 1) fbusy bit = 1 10 s note 1: check flash status register 4 (fstat4) flockst bit. figure 6.5.13 read lock bit status (register read mode) the following describes how to write to the lock bit. a) to clear the lock bit to "0" (flash protected) issue the lock bit program command (h?7777) to the memory block to be protected. b) to set the lock bit to "1" (flash unprotected) after setting the fprot bit in flash control register 2 to 1 (protection by lock bit disabled), use the block erase command (h?2020) to erase the memory block to be unprotected. the lock bit cannot be set to "1" directly by writing to it. c) lock bit status when reset because the lock bit is a nonvolatile bit, it remains unaffected when the microcomputer is reset or powered off.
6 6-34 internal memory 32176 group user?s manual (rev.1.01) 6.5.4 flash programming time (reference) the following shows the time needed to program internal flash memory for reference. (1) m32176f4 [1] time required for transfer by sio (for a transfer data size of 512 kb) 1/57,600 bps [2] time required for programming the flash memory 512 kb / 2-byte [3] time required for erasing the entire area 0.3 s [4] total flash programming time (entire 512 kb area) when communicating at 57,600 bps via uart, the flash programming time can be ignored because it is very short compared to the serial communication time. therefore, the total flash programming time can be calculated using the equation below. [1] + [3] = approx. 108 [s] if the transfer time can be ignored by speeding up the serial communication or by other means, the fastest programming time possible can be calculated using the equation below. [2] + [3] = approx. 15 [s] (1) m32176f3 1) time required for transfer by sio (for a transfer data size of 384 kb) 1/57,600 bps 2) time required for programming the flash memory 384 kb / 2-byte 3) time required for erasing the entire area 0.3 s 4) total flash programming time (entire 384 kb area) when communicating at 57,600 bps via uart, the flash programming time can be ignored because it is very short compared to the serial communication time. therefore, the total flash programming time can be calculated using the equation below. [1] + [3] = approx. 82 [s] if the transfer time can be ignored by speeding up the serial communication or by other means, the fastest programming time possible can be calculated using the equation below. [2] + [3] = approx. 11 [s] 6.5 programming the internal flash memory
6 6-35 internal memory 32176 group user?s manual (rev.1.01) 6.5 programming the internal flash memory (3) m32176f2 1) time required for transfer by sio (for a transfer data size of 256 kb) 1/57,600 bps 2) time required for programming the flash memory 256 kb / 2-byte 3) time required for erasing the entire area 0.3 s 4) total flash programming time (entire 256 kb area) when communicating at 57,600 bps via uart, the flash programming time can be ignored because it is very short compared to the serial communication time. therefore, the total flash programming time can be calculated using the equation below. [1] + [3] = approx. 55 [s] if the transfer time can be ignored by speeding up the serial communication or by other means, the fastest programming time possible can be calculated using the equation below. [2] + [3] = approx. 8 [s]
6 6-36 internal memory 32176 group user?s manual (rev.1.01) 6.6 virtual flash emulation function the microcomputer has the function to map 8-kbyte memory blocks of the internal ram (max. 2 blocks) into areas (l banks) of the internal flash memory that are divided in 8-kbyte units and to map 4-kbyte memory blocks of the internal ram (max. 2 blocks) into areas (s banks) of the internal flash memory that are divided in 4-kbyte units. this functions is referred to as the virtual flash emulation function. this function allows the data located in 4-kbyte or 8-kbyte blocks of the internal ram to be changed with the contents of internal flash memory at the addresses specified by the virtual flash bank register. that way, the relevant ram data can read out by reading the content of internal flash memory. for applications that require modifying the contents of internal flash memory (e.g., data table) during operation, this function enables dynamic data modification by modifying the relevant ram data. the ram blocks allocated for virtual flash emulation can be accessed for read and write the same way as in usual ram. this function, when used in combination with the microcomputer?s internal real-time debugger (rtd), allows the data table, etc. created in the internal flash memory to be referenced or rewritten from the outside, thereby facili- tating data table tuning from an external device. note: ? before programming/erasing the internal flash memory, always be sure to exit this virtual flash emulation mode. figure 6.6.1 internal ram bank configuration of the m32176 6.6 virtual flash emulation function ram bank l block 0 (felbank0) 8 kbytes h'0080 4000 h'0080 6000 h'0080 7000 ram bank s block 0 (fesbank0) 4 kbytes ram bank s block 1 (fesbank1) 4 kbytes h'0080 7fff ram bank l block 1 (felbank1) 8 kbytes h'0080 8000 h'0080 9fff
6 6-37 internal memory 32176 group user?s manual (rev.1.01) 6.6.1 virtual flash emulation area the following shows the internal flash memory areas in which the virtual flash emulation function is applicable. using the virtual flash l bank register (felbank0, felbank1), select one among all l banks of internal flash memory that are divided in 8-kbyte units (by setting the seven start address bits a12?a18 of the desired l bank in the virtual flash l bank register lbankad bits). then set the virtual flash l bank register?s flash emula- tion l enable bit (modenl) to "1", and the selected l bank area will be replaced with 8-kbyte blocks of the internal ram, up to two blocks in all. using the virtual flash s bank register (fesbank0, fesbank1), select one among all s banks of internal flash memory that are divided in 4-kbyte units (by setting the eight start address bits a12?a19 of the desired s bank in the virtual flash s bank register sbankad bits). then set the virtual flash s bank register?s flash emulation s enable bit (modens) to "1", and the selected s bank area will be replaced with 4-kbyte blocks of the internal ram, up to two blocks in all. two 8-kbyte units l banks and two 4-kbyte units s banks, total of four banks (maximum), can be selected. notes: ? if the same bank area is set in two or more virtual flash bank registers and each register?s flash emulation enable bit is enabled, the bank is assigned the corresponding internal ram area (8- kbyte or 4-kbyte) according to the priority given below. felbank0 > fesbank0 > fesbank1 > felbank1 ? during virtual flash emulation mode, ram can be accessed for read and write from the internal ram area and the virtual flash set area. ? before reading any virtual flash area after setting the flash control register 1 virtual flash emula- tion mode bit to "1", be sure that there must be an interval of at least three clocks (cpu clocks). ? before reading any virtual flash area after setting the virtual flash bank register (l bank and s bank registers) virtual flash emulation enable bit and bank address bits, be sure that there must be an interval of at least three clocks (cpu clocks). 6.6 virtual flash emulation function
6 6-38 internal memory 32176 group user?s manual (rev.1.01) 6.6 virtual flash emulation function figure 6.6.2 m32176f4 virtual flash emulation area divided in 8-kbyte units figure 6.6.3 m32176f4 virtual flash emulation area divided in 4-kbyte units h'0000 0000 h'0000 2000 h'0080 4000 h'0000 4000 h'0007 e000 h'0007 c000 h'0080 6000 h'0080 7000 h'0080 8000 8 kbytes 4 kbytes 4 kbytes 8 kbytes l bank 0 (8 kbytes) l bank 1 (8 kbytes) l bank 2 (8 kbytes) l bank 62 (8 kbytes) l bank 63 (8 kbytes) notes: ? if the same bank area is set in two or more virtual flash bank registers and each register's flash emulation enable bit is enabled, the bank is assigned the corresponding internal ram area in order of priority: felbank0 > fesbank0 > fesbank1 > felbank1.  if any 8-kbyte area (l bank) specified by the virtual flash l bank registers 0 and 1 is accessed, its corresponding internal ram area is accessed. during virtual flash emulation mode, ram can be accessed for read and write from both the internal ram area and the virtual flash set area. h'0000 0000 h'0000 1000 h'0080 4000 h'0000 2000 h'0007 f000 h'0007 e000 h'0080 6000 h'0080 7000 h'0080 8000 8 kbytes 4 kbytes 4 kbytes 8 kbytes s bank 0 (4 kbytes) s bank 1 (4 kbytes) s bank 2 (4 kbytes) s bank 126 (4 kbytes) s bank 127 (4 kbytes) notes:  if the same bank area is set in two or more virtual flash bank registers and each register's flash emulation enable bit is enabled, the bank is assigned the corresponding internal ram area in order of priority: felbank0 > fesbank0 > fesbank1 > felbank1.  if any 4-kbyte area (s bank) specified by the virtual flash s bank registers 0 and 1 is accessed, its corresponding internal ram area is accessed. during virtual flash emulation mode, ram can be accessed for read and write from both the internal ram area and the virtual flash set area.
6 6-39 internal memory 32176 group user?s manual (rev.1.01) 6.6 virtual flash emulation function figure 6.6.4 m32176f3 virtual flash emulation area divided in 8-kbyte units figure 6.6.5 m32176f3 virtual flash emulation area divided in 4-kbyte units h'0000 0000 h'0000 2000 h'0080 4000 h'0000 4000 h'0005 e000 h'0005 c000 h'0080 6000 h'0080 7000 h'0080 8000 8 kbytes 4 kbytes 4 kbytes 8 kbytes l bank 0 (8 kbytes) l bank 1 (8 kbytes) l bank 2 (8 kbytes) l bank 46 (8 kbytes) l bank 47 (8 kbytes) notes:  if the same bank area is set in two or more virtual flash bank registers and each register's flash emulation enable bit is enabled, the bank is assigned the corresponding internal ram area in order of priority: felbank0 > fesbank0 > fesbank1 > felbank1.  if any 8-kbyte area (l bank) specified by the virtual flash l bank registers 0 and 1 is accessed, its corresponding internal ram area is accessed. during virtual flash emulation mode, ram can be accessed for read and write from both the internal ram area and the virtual flash set area. h'0000 0000 h'0000 1000 h'0080 4000 h'0000 2000 h'0005 f000 h'0005 e000 h'0080 6000 h'0080 7000 h'0080 8000 8 kbytes 4 kbytes 4 kbytes 8 kbytes s bank 0 (4 kbytes) s bank 1 (4 kbytes) s bank 2 (4 kbytes) s bank 94 (4 kbytes) s bank 95 (4 kbytes) notes:  if the same bank area is set in two or more virtual flash bank registers and each register's flash emulation enable bit is enabled, the bank is assigned the corresponding internal ram area in order of priority: felbank0 > fesbank0 > fesbank1 > felbank1.  if any 4-kbyte area (s bank) specified by the virtual flash s bank registers 0 and 1 is accessed, its corresponding internal ram area is accessed. during virtual flash emulation mode, ram can be accessed for read and write from both the internal ram area and the virtual flash set area.
6 6-40 internal memory 32176 group user?s manual (rev.1.01) figure 6.6.6 m32176f2 virtual flash emulation area divided in 8-kbyte units 6.6 virtual flash emulation function figure 6.6.7 m32176f2 virtual flash emulation area divided in 4-kbyte units h'0000 0000 h'0000 2000 h'0080 4000 h'0000 4000 h'0003 e000 h'0003 c000 h'0080 6000 h'0080 7000 h'0080 8000 8 kbytes 4 kbytes 4 kbytes 8 kbytes l bank 0 (8 kbytes) l bank 1 (8 kbytes) l bank 2 (8 kbytes) l bank 30 (8 kbytes) l bank 31 (8 kbytes) notes:  if the same bank area is set in two or more virtual flash bank registers and each register's flash emulation enable bit is enabled, the bank is assigned the corresponding internal ram area in order of priority: felbank0 > fesbank0 > fesbank1 > felbank1.  if any 8-kbyte area (l bank) specified by the virtual flash l bank registers 0 and 1 is accessed, its corresponding internal ram area is accessed. during virtual flash emulation mode, ram can be accessed for read and write from both the internal ram area and the virtual flash set area. h'0000 0000 h'0000 1000 h'0080 4000 h'0000 2000 h'0003 f000 h'0003 e000 h'0080 6000 h'0080 7000 h'0080 8000 8 kbytes 4 kbytes 4 kbytes 8 kbytes s bank 0 (4 kbytes) s bank 1 (4 kbytes) s bank 2 (4 kbytes) s bank 62 (4 kbytes) s bank 63 (4 kbytes) notes:  if the same bank area is set in two or more virtual flash bank registers and each register's flash emulation enable bit is enabled, the bank is assigned the corresponding internal ram area in order of priority: felbank0 > fesbank0 > fesbank1 > felbank1.  if any 4-kbyte area (s bank) specified by the virtual flash s bank registers 0 and 1 is accessed, its corresponding internal ram area is accessed. during virtual flash emulation mode, ram can be accessed for read and write from both the internal ram area and the virtual flash set area.
6 6-41 internal memory 32176 group user?s manual (rev.1.01) figure 6.6.8 values set in the m32176f4?s virtual flash bank register when divided in 8-kbyte units figure 6.6.9 values set in the m32176f4?s virtual flash bank register when divided in 4-kbyte units h'0000 0000 l bank start address of bank in flash memory values set in l bank address (lbankad) bit l bank 0 l bank 1 l bank 2 l bank 62 l bank 63 h'0000 2000 h'0000 4000 h'0007 c000 h'0007 e000 h'00 h'02 h'04 h'7c h'7e (note 1) (note 1) (note 1) (note 1) (note 1) note 1: set the seven start address bits a12-a18 of each l bank of internal flash memory that is divided in 8-kbyte units in the virtual flash l bank register's l bank address (lbankad) bits. h'0000 0000 s bank s bank 0 s bank 1 s bank 2 s bank 126 s bank 127 h'0000 1000 h'0000 2000 h'0007 e000 h'0007 f000 h'00 h'01 h'02 h'7e h'7f start address of bank in flash memory values set in s bank address (sbankad) bit (note 1) (note 1) (note 1) (note 1) (note 1) note 1: set the eight start address bits a12-a19 of each s bank of internal flash memory that is divided in 4-kbyte units in the virtual flash s bank register's s bank address (sbankad) bits. 6.6 virtual flash emulation function
6 6-42 internal memory 32176 group user?s manual (rev.1.01) 6.6 virtual flash emulation function figure 6.6.10 values set in the m32176f3?s virtual flash bank register when divided in 8-kbyte units figure 6.6.11 values set in the m32176f3?s virtual flash bank register when divided in 4-kbyte units h'0000 0000 l bank l bank 0 l bank 1 l bank 2 l bank 46 l bank 47 h'0000 2000 h'0000 4000 h'0005 c000 h'0005 e000 h'00 h'02 h'04 h'5c h'5e start address of bank in flash memory values set in l bank address (lbankad) bit (note 1) (note 1) (note 1) (note 1) (note 1) note 1: set the seven start address bits a12-a18 of each l bank of internal flash memory that is divided in 8-kbyte units in the virtual flash l bank register's l bank address (lbankad) bits. h'0000 0000 s bank s bank 0 s bank 1 s bank 2 s bank 94 s bank 95 h'0000 1000 h'0000 2000 h'0005 e000 h'0005 f000 h'00 h'01 h'02 h'5e h'5f start address of bank in flash memory values set in s bank address (sbankad) bit (note 1) (note 1) (note 1) (note 1) (note 1) note 1: set the eight start address bits a12-a19 of each s bank of internal flash memory that is divided in 4-kbyte units in the virtual flash s bank register's s bank address (sbankad) bits.
6 6-43 internal memory 32176 group user?s manual (rev.1.01) 6.6 virtual flash emulation function figure 6.6.12 values set in the m32176f2?s virtual flash bank register when divided in 8-kbyte units figure 6.6.13 values set in the m32176f2?s virtual flash bank register when divided in 4-kbyte units h'0000 0000 l bank l bank 0 l bank 1 l bank 2 l bank 30 l bank 31 h'0000 2000 h'0000 4000 h'0003 c000 h'0003 e000 h'00 h'02 h'04 h'3c h'3e start address of bank in flash memory values set in l bank address (lbankad) bit (note 1) (note 1) (note 1) (note 1) (note 1) note 1: set the seven start address bits a12-a18 of each l bank of internal flash memory that is divided in 8-kbyte units in the virtual flash l bank register's l bank address (lbankad) bits. h'0000 0000 s bank s bank 0 s bank 1 s bank 2 s bank 62 s bank 63 h'0000 1000 h'0000 2000 h'0003 e000 h'0003 f000 h'00 h'01 h'02 h'3e h'3f start address of bank in flash memory values set in s bank address (sbankad) bit (note 1) (note 1) (note 1) (note 1) (note 1) note 1: set the eight start address bits a12-a19 of each s bank of internal flash memory that is divided in 4-kbyte units in the virtual flash s bank register's s bank address (sbankad) bits.
6 6-44 internal memory 32176 group user?s manual (rev.1.01) 6.6.2 entering virtual flash emulation mode to enter virtual flash emulation mode, set the flash control register 1 (fcnt1) femmod bit by writing "1". after entering virtual flash emulation mode, set the virtual flash bank register moden bit to "1" to enable the virtual flash emulation function. even during virtual flash emulation mode, the internal ram area (h?0080 4000 through h?0080 9fff) can be accessed the same way as in usual internal ram. figure 6.6.14 virtual flash emulation mode sequence 6.6 virtual flash emulation function set ram location address in virtual flash bank register lbankad address a12?a18 sbankad address a12?a19 write flash data to ram enable virtual flash emulation modenl 1 modens 1 settings completed enter virtual flash emulation mode femmod 1 settings start
6 6-45 internal memory 32176 group user?s manual (rev.1.01) 6.6.3 application example of virtual flash emulation mode by using two ram areas that have been set in the same flash area by the virtual flash emulation function, the data in the flash memory can be replaced successively. figure 6.6.15 application example of virtual flash emulation mode (1/2) replace area flash memory ram block 0 data write to ram0 ram block 1 (1) operation when reset replaced data write to ram1 (2) programming operation using ram block 0 flash memory initial value initial value ram block 0 ram block 1 replaced (3) programming operation switched from ram block 0 to ram block 1 flash memory initial value ram block 0 ram block 1 ram block 1 bank xx bank xx bank xx bank xx specified bank xx specified bank xx specified (settings invalid) ram block 0 ram block 0 6.6 virtual flash emulation function
6 6-46 internal memory 32176 group user?s manual (rev.1.01) replaced (4) programming operation using ram block 1 flash memory initial value ram block 0 ram block 1 ram block 1 bank xx bank xx specified replaced (5) programming operation switched from ram block 1 to ram block 0 ram block 0 flash memory initial value ram block 0 ram block 1 ram block 1 bank xx bank xx specified bank xx specified (settings invalid) (6) go to (2) note: enclosed in are the valid area. data write to ram0 figure 6.6.17 application example of virtual flash emulation mode (2/2) 6.6 virtual flash emulation function
6 6-47 internal memory 32176 group user?s manual (rev.1.01) 6.7 connecting to a serial programmer 6.7 connecting to a serial programmer (csio mode) for the internal flash memory to be rewritten in boot mode + flash e/w enable mode by using a general-purpose serial programmer, several pins on the microcomputer must be processed to make them suitable for the serial programmer, as shown below. table 6.7.1 processing microcomputer pins before using a serial programmer pin name pin no. sclki1 71 rxd1 70 txd1 69 p84 68 fp 94 mod0 92 mod1 93 mod2 123 reset# 91 xin 4 xo ut 5 sbi# 77 vref0 42 avcc0 43 avss0 60 vdd 108 vcce 20, 65, 95, 132 excvcc 61, 137 excvdd 73 excosc- vcc 6 vss 3, 21, 62, 72, 96, 138 jtrst 111 function transfer clock input serial data input (received data) serial data output (transmit data) transmit/receive enable output flash memory protect operation mode 0 operation mode 1 operation mode 2 reset clock input clock output sbi interrupt input remark pull high pull high pull high pull high connect to the main power supply connect to ground connect to ground after setting mod0/mod1, ground and back to main power supply pull high or low reference voltage input for a-d converter analog power supply analog ground ram backup power supply main power supply connects external capacitance for the internal power supply connects external capacitance for the ram power supply connects external capacitance for the oscillator power supply ground jtag reset input connect to the main power supply connect to the main power supply connect to ground connect to the main power supply 5 v +/- 10% or 3.3 v +/- 10% need to be grounded to earth via capacitor need to be grounded to earth via capacitor need to be grounded to earth via capacitor 0v pull low notes ? pin processing is not required for those that are not listed above.
6 6-48 internal memory 32176 group user?s manual (rev.1.01) 6.7 connecting to a serial programmer figure 6.7.1 pin connection diagram the diagram below shows an example of a user system configuration which has had a serial programmer con- nected. after the user system is powered on, the serial programmer writes to the internal flash memory in clock- synchronized serial mode. no communication problems associated with the oscillator frequency may occur. if the system uses any pins that are to be connected to a serial programmer, care must be taken to prevent adverse effects on the system when a serial programmer is connected. note that the serial programmer uses the ad- dresses h?0000 0084 through h?0000 0093 as an area in which to check the id for flash memory protection. if the internal flash memory needs to be protected, set any id in this area. 2k ? 32176 xout xin jtrst mod1 osc-vss avss0 vss reset# fp mod0 p84/sclki0/sclko0 p87/sclki1/sclko1 p86/rxd1 p85/txd1 excvdd excvcc vref0 avcc0 excosc-vcc vdde vcce connect to the vcce (5 or 3.3 v) power supply rail main power supply connect to the vcce (5 or 3.3v) power supply rail main power supply (for reference) rxd (input) txd (output) sclk0 (output) busy (input) mod0 (output) fp (output) reset (output) gnd (common) connector flash programmer signals to system circuit set microcomputer operating conditions user system board notes:  turn on the power for the user system before writing to the internal flash memory.  if p84-p87 are used in the system circuit, connection to a serial programmer must be taken into consideration.  sbi# must be fixed high or low to ensure that no interrupts will be generated.  the pullup resistance values of p84, p86 and p87 must be selected to suit the system design condition.  the typical pullup resistance values of p84, p86 and p87 are 4.7 to 10 k ? .  the status of any other ports that are not shown here will not affect flash memory programming.  make sure the mode setting pin/power supply voltages do not fluctuate to prevent unintended changes of modes while rewriting the internal flash memory. mod2
6 6-49 internal memory 32176 group user?s manual (rev.1.01) 6.8 internal flash memory protect function the internal flash memory has the following four types of protect functions to prevent it from being inadvertently rewritten or illegally copied, programmed or erased. (1) flash memory protect id when using a tool to program/erase the internal flash memory such as a general-purpose programmer or emu- lator, the id entered by a tool and the id stored in the internal flash memory are collated. unless the correct id is entered, no programming/erase operations can be performed. (for some tools, tool execution is enabled after erasing the entire flash memory area, and the internal flash memory becomes accessible for write.) (2) protection by fp pin the internal flash memory is protected in hardware against programming/erase operation by pulling the fp (flash protect) pin low. furthermore, because the fp pin level can be known by reading the flash mode regis- ter (fmod)?s fpmod (external fp pin status) bit in the flash write/erase program, the internal flash memory can also be protected in software. for systems that do not require protection by setting external pins, the fp pin may be fixed high to simplify the operation to program/erase the internal flash memory. (3) protection by fentry bit flash e/w enable mode cannot be entered into unless the flash control register 1 (fcnt1)?s fentry (flash mode entry) bit is set to "1". to set the fentry bit to "1", write "0" and then "1" in succession while the fp pin is high. (4) protection by a lock bit any block of internal flash memory can be protected by setting the lock bit provided for it to "0". that memory block is disabled against programming/erase operation. 6.8 internal flash memory protect function
6 6-50 internal memory 32176 group user?s manual (rev.1.01) 6.9 precautions to be taken when rewriting the internal flash memory 6.9 precautions to be taken when rewriting the internal flash memory the following describes precautions to be taken when programming/erasing the internal flash memory. ? when the internal flash memory is programmed or erased, a high voltage is generated internally. because mode transitions during programming/erase operation may cause the chip to break down, make sure the mode setting pin/power supply voltages do not fluctuate to prevent unintended changes of modes. ? if the system uses any pins that are to be used by a general-purpose programming/erase tool, care must be taken to prevent adverse effects on the system when the tool is connected. ? if the internal flash memory needs to be protected while using a general-purpose programming/erase tool, set any id in the flash memory protect id verification area (h?0000 0084 to h?0000 0093). ? if the internal flash memory does not need to be protected while using a general-purpose programming/erase tool, fill the entire flash memory protect id verification area (h?0000 0084 to h?0000 0093) with h?ff. ? if the flash status register (fstat)?s each error status is to be cleared (initialized to h?80) by resetting the flash control register 4 (fcnt4) freset bit, check to see that the flash status register (fstat) fbusy bit = "1" (ready) before clearing the error status. ? before resetting the flash control register 1 (fcnt1) fentry bit from "1" to "0", check to see that the flash status register (fstat) fbusy bit = "1" (ready). ? do not clear the fentry bit if the flash control register 1 (fcnt1) fentry bit = "1" and the flash status register (fstat) fbusy bit = "0" (being programmed or erased). ? when programming/erasing via jtag, the flash memory can be programmed or erased regardless of the pin state because the fp pin is controlled internally within the chip.
chapter 7 reset 7.1 outline of reset 7.2 reset operation 7.3 internal state immediately after exiting reset 7.4 things to be considered after exiting reset
7 7-2 reset 32176 group user?s manual (rev.1.01) 7.1 outline of reset the microcomputer is reset by applying a low-level signal to the reset# input pin. the microcomputer is gotten out of a reset state by releasing the reset# input back high, upon which the reset vector entry address is set in the program counter (pc) and the cpu starts executing from the reset vector entry. 7.2 reset operation when a low-level signal in width of more than 200 ns (a duration needed for noise cancellation) is applied to the reset# pin, the microcomputer enters a reset state. at this time, the internal circuits (including the cpu) are reset. (for details about the pin state when reset, see table 1.4.1, ?pin assignments?) when the reset# input is returned high, the internal circuits get out of a reset state 512-513 bclk periods after that. 7.1 outline of reset noise canceller s r ovf internal circuit reset signal flip-flop counter reset# extended for a duration during which the reset# input is held low 512?513bclk reset# pin reset signal (internal signal) past the noise canceller internal circuit reset signal (internal signal) duration needed for noise cancellation (note 1) 200ns note 1: if the low level duration of the reset signal is less than 200 ns, it is cancelled by the noise canceller. figure 7.2.2 reset sequence figure 7.2.1 reset circuit
7 7-3 reset 32176 group user?s manual (rev.1.01) 7.2 reset operation 7.2.1 reset at power-on when powering on the microcomputer, hold the reset# signal input pin low until the rated power supply volt- age is reached and the microcomputer?s internal x4 clock generator becomes oscillating stably. 7.2.2 reset during operation to reset the microcomputer during operation, hold the reset# signal input pin low for more than 200 ns. 7.2.3 reset vector relocation during flash programming when the microcomputer is reset after entering boot mode, the reset vector entry address is moved to the boot program startup address. the boot program starts running after the reset state is deasserted. for details, see section 6.5, ?programming the internal flash memory.?
7 7-4 reset 32176 group user?s manual (rev.1.01) 7.3 internal state immediately after exiting reset 7.3 internal state immediately after exiting reset the table below lists the internal state of the microcomputer immediately after it has gotten out of a reset state. for details about the initial register state of each internal peripheral i/o, see each section in this manual in which the relevant internal peripheral i/o is described. table 7.3.1 internal state immediately after exiting reset register state after reset psw (cr0) b'0000 0000 0000 0000 ??00 000? 0000 0000 (bsm, bie, bc bits = undefined) cbr (cr1) h'0000 0000 (c bits = 0) spi (cr2) undefined spu (cr3) undefined bpc (cr6) undefined pc h'0000 0000 (executed beginning with the address h?0000 0000) (note 1) r0?r15 undefined acc (accumulator) undefined ram undefined when reset at power-on. (however, if the ram is gotten out of reset after returning from backup mode, it retains the content it had before being reset.) note 1: when in boot mode, the cpu executes the boot program. 7.4 things to be considered after exiting reset ? input/output ports after exiting the reset state, the microcomputer?s input/output ports are disabled against input in order to prevent current from flowing through the port. to use any ports in input mode, set the port input special function control register (picnt) pien0 bit to enable them for input. for details, see section 8.3, ?input/output port related registers.?
chapter 8 input/output ports and pin functions 8.1 outline of input/output ports 8.2 selecting pin functions 8.3 input/output port related registers 8.4 port input level switching function 8.5 port peripheral circuits 8.6 precautions on input/output ports
8 8-2 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.1 outline of input/output ports the 32176 has a total of 96 input/output ports from p0-p13, p15, p17 and p22 (except p5, which is reserved for future use). these input/output ports can be used as input or output ports by setting the respective direction registers. each input/output port is a dual-function or triple-function pin, sharing the pin with other internal peripheral i/o or external extension bus signal line. pin functions are selected depending on the current operation mode or by setting the input/output port operation mode registers. (if any internal peripheral i/o has still another function, it is also necessary to set the register provided for that peripheral i/o.) the microcomputer also has a port input function enable bit that can be used to prevent current from flowing into the input ports. this helps to simplify the software and hardware processing to be performed immediately after reset or during flash programming. note that before any ports can be used in input mode, this port input function enable bit must be set accordingly. the input/output ports are outlined below. table 8.1.1 outline of input/output ports item specification number of ports total 96 ports p0 : p00?p07 (8 ports) p1 : p10?p17 (8 ports) p2 : p20?p27 (8 ports) p3 : p30?p37 (8 ports) p4 : p41?p47 (7 ports) p6 : p61?p63 (3 ports) p7 : p70?p77 (8 ports) p8 : p82?p87 (6 ports) p9 : p93?p97 (5 ports) p10 : p100?p107 (8 ports) p11 : p110?p117 (8 ports) p12 : p124?p127 (4 ports) p13 : p130?p137 (8 ports) p15 : p150, p153 (2 ports) p17 : p174, p175 (2 ports) p22 : p220, p221, p225 (3 ports) port function the input/output ports can individually be set for input or output mode using the direction control register provided for each input/output port. (however, p221 is a can input-only port.) pin function shared with peripheral i/o or external extension signals to serve dual-functions (or shared with two or more peripheral i/o functions to serve triple-functions) pin function p0?p4, p225: depends on the cpu operation mode (that is set by mod0 and mod1 pins). selection p6?p22: as set by each input/output port?s operation mode register. (however, peripheral i/o pin functions are selected by peripheral i/o registers.) note: ? p5, p14, p16, p18-p21 are nonexist. 8.1 outline of input/output ports
8 8-3 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.2 selecting pin functions 8.2 selecting pin functions each input/output port serves dual functions sharing the pin with other internal peripheral i/o or external extension bus signal line (or triple functions sharing the pin with two or more peripheral i/o functions). pin functions are selected depending on the current operation mode or by setting the input/output port operation mode registers. p0?p4 and p225, when the cpu is set to operate in external extension mode or processor mode, all are switched to serve as signal pins for external access. the cpu operation mode is determined depending on how the mod0 and mod1 pins are set (see the table below). table 8.2.1 cpu operation modes and p0?p4 and p225 pin functions mod0 mod1 operation mode p0?p4 and p225 pin function vss vss single-chip mode input/output port pin vss vcce external extension mode external extension signal pin vcce vss processor mode vcce vcce reserved (use inhibited) ? note: ? vcce and vss are connected to main power supply and gnd, respectively. each input/output port has their functions switched between input/output port pins and internal peripheral i/o pins by setting the respective port operation mode registers. if any internal peripheral i/o has two or more pin functions, use the register provided for that peripheral i/o to select the desired pin function. note that fp and mod1 pin settings during internal flash memory programming do not affect the pin functions.
8 8-4 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.2 selecting pin functions figure 8.2.1 input/output ports and pin function assignments p0 p1 p2 p3 p4 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p5 db0 01 234 567 db1 db2 db3 db4 db5 db6 db7 db8 db9 db10 db11 db12 db13 db14 db15 a23 a24 a25 a26 a27 a28 a29 a30 a15 a16 a17 a18 a19 a20 a21 a22 blw#/ ble# bhw#/ bhe# rd# cs0# cs1# a13 a14 (p61) (p62) (p63) bclk/ wr# wait# hreq# hack# rtdtxd/ txd3 (note 2) rtdrxd/ rxd3 (note 2) rtdack/ ctx1 (note 2) rtdclk/ crx1 (note 2) txd0 rxd0 sclki0/ sclko0 txd1 rxd1 sclki1/ sclko1 to16 to17 to18 to19 to20 to11 to12 to13 to14 to15 to10 to9 to8 to3 to4 to5 to6 to7 to2 to1 to0 tclk0 tclk1 tclk2 tclk3 tin16 tin17 tin18 tin19 tin20 tin21 tin22 tin23 p16 p17 txd2 p18 p19 p20 p21 p22 ctx0 crx0 rxd2 tin0 tin3 mod1 (note 3) mod0 (note 3) a12 (note 1) sbi# (note 3) input/output port operation mode setting (reserved) cpu operation mode settings (note 1) note 1: the pin function changes depending on the setting for mod0 and mod1 pins. note 2: these are triple-function pins. their desired output function must be selected using the port peripheral function selec t register. note 3: these ports cannot be used for input/output port function. the sbi#, mod0 and mod1 pin input levels can be read from th ese ports. note: ? p5, p14, p16, p18, p19, p20 and p21 are not provided.
8 8-5 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.3 input/output port related registers the input/output port related registers included in the microcomputer consists of the port data register, port direc- tion register and port operation mode register. note that p5 is reserved for future use. the tables below show an input/output port related register map. input/output port related register map (1/2) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0700 p0 data register p1 data register 8-7 (p0data) (p1data) h'0080 0702 p2 data register p3 data register 8-7 (p2data) (p3data) h'0080 0704 p4 data register (use inhibited area) 8-7 (p4data) h'0080 0706 p6 data register p7 data register 8-7 (p6data) (p7data) h'0080 0708 p8 data register p9 data register 8-7 (p8data) (p9data) h'0080 070a p10 data register p11 data register 8-7 (p10data) (p11data) h'0080 070c p12 data register p13 data register 8-7 (p12data) (p13data) h'0080 070e (use inhibited area) p15 data register 8-7 (p15data) h'0080 0710 (use inhibited area) p17 data register 8-7 (p17data) h'0080 0712 (use inhibited area) (use inhibited area) h'0080 0714 (use inhibited area) (use inhibited area) h'0080 0716 p22 data register (use inhibited area) 8-7 (p22data) (use inhibited area) h'0080 0720 p0 direction register p1 direction register 8-8 (p0dir) (p1dir) h'0080 0722 p2 direction register p3 direction register 8-8 (p2dir) (p3dir) h'0080 0724 p4 direction register (use inhibited area) 8-8 (p4dir) h'0080 0726 p6 direction register p7 direction register 8-8 (p6dir) (p7dir) h'0080 0728 p8 direction register p9 direction register 8-8 (p8dir) (p9dir) h'0080 072a p10 direction register p11 direction register 8-8 (p10dir) (p11dir) h'0080 072c p12 direction register p13 direction register 8-8 (p12dir) (p13dir) h'0080 072e (use inhibited area) p15 direction register 8-8 (p15dir) h'0080 0730 (use inhibited area) p17 direction register 8-8 (p17dir) h'0080 0732 (use inhibited area) (use inhibited area) h'0080 0734 (use inhibited area) (use inhibited area) h'0080 0736 p22 direction register (use inhibited area) 8-8 (p22dir) 8.3 input/output port related registers |
8 8-6 input/output ports and pin functions 32176 group user?s manual (rev.1.01) input/output port related register map (2/2) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0744 (use inhibited area) port input special function control register 8-15 (picnt) h'0080 0746 (use inhibited area) p7 operation mode register 8-9 (p7mod) h'0080 0748 p8 operation mode register p9 operation mode register 8-9 (p8mod) (p9mod) 8-10 h'0080 074a p10 operation mode register p11 operation mode register 8-10 (p10mod) (p11mod) 8-11 h'0080 074c p12 operation mode register p13 operation mode register 8-11 (p12mod) (p13mod) 8-12 h'0080 074e (use inhibited area) p15 operation mode register 8-12 (p15mod) h'0080 0750 (use inhibited area) p17 operation mode register 8-13 (p17mod) h'0080 0752 (use inhibited area) (use inhibited area) h'0080 0754 (use inhibited area) (use inhibited area) h'0080 0756 p22 operation mode register (use inhibited area) 8-13 (p22mod) (use inhibited area) h'0080 0760 port group 0,1 input level setting register port group 3 input level setting register 8-18 (pg01lev) (pg3lev) h'0080 0762 port group 4,5 input level setting register port group 6,7 input level setting register 8-18 (pg45lev) (pg67lev) h'0080 0764 port group 8 input level setting register (use inhibited area) 8-18 (pg8lev) h'0080 0766 (use inhibited area) p7 peripheral function select register 8-14 (p7smod) 8.3 input/output port related registers |
8 8-7 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.3.1 port data registers p0 data register (p0data) p1 data register (p1data) p2 data register (p2data) p3 data register (p3data) p4 data register (p4data) p6 data register (p6data) p7 data register (p7data) p8 data register (p8data) p9 data register (p9data) p10 data register (p10data) p11 data register (p11data) p12 data register (p12data) p13 data register (p13data) p15 data register (p15data) p17 data register (p17data) p22 data register (p22data) n = 0?13, 15, 17, 22 (not including p5) b bit name function r w 0(b8) pn0dt (port pn0 data bit) r w 1(b9) pn1dt (port pn1 data bit) depends on how the port direction register is set 2(b10) pn2dt (port pn2 data bit) if direction bit = "0" (input mode) 3(b11) pn3dt (port pn3 data bit) 0: port input pin = "low" 4(b12) pn4dt (port pn4 data bit) 1: port input pin = "high" 5(b13) pn5dt (port pn5 data bit) if direction bit = "1" (output mode) (note 1) 6(b14) pn6dt (port pn6 data bit) 0: port output latch = "0" / port pin level = "low" 7(b15) pn7dt (port pn7 data bit) 1: port output latch = "1" / port pin level = "high" write to the port output latch note 1: to select the port data to read, use the port input special function control register?s port input data select bit (pis el). notes: ? following bits are not provided (read as "0", writing has no effect): p40, p60, p65?p67, p90?p92, p120?p123, p151, p152, p154?p157, p170?p173, p176, p177, p222?p224, p226, p227 ? the sbi# pin level can be read out by reading the p64dt bit. writing to the p64dt bit has no effect. ? the mod0 and mod1 pin levels can be read out by reading the p80dt and p81dt bits, respectively. writing to the p80dt and p81dt bits has no effect. ? p221 is an input-only port. writing to the p221dt bit has no effect. 8.3 input/output port related registers b0 123456b7 (b8 9 10 11 12 13 14 b15) pn0dt pn1dt pn2dt pn3dt pn4dt pn5dt pn6dt pn7dt ????????
8 8-8 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.3.2 port direction registers p0 direction register (p0dir) p1 direction register (p1dir) p2 direction register (p2dir) p3 direction register (p3dir) p4 direction register (p4dir) p6 direction register (p6dir) p7 direction register (p7dir) p8 direction register (p8dir) p9 direction register (p9dir) p10 direction register (p10dir) p11 direction register (p11dir) p12 direction register (p12dir) p13 direction register (p13dir) p15 direction register (p15dir) p17 direction register (p17dir) p22 direction register (p22dir) n = 0?13, 15, 17, 22 (not including p5) b bit name function r w 0(b8) pn0dr (port pn0 direction bit) 0: input mode r w 1(b9) pn1dr (port pn1 direction bit) 1: output mode 2(b10) pn2dr (port pn2 direction bit) 3(b11) pn3dr (port pn3 direction bit) 4(b12) pn4dr (port pn4 direction bit) 5(b13) pn5dr (port pn5 direction bit) 6(b14) pn6dr (port pn6 direction bit) 7(b15) pn7dr (port pn7 direction bit) notes: ? following bits are not provided (read as 0, writing has no effect): p40, p60, p64?p67, p80, p81, p90?p92, p120?p123, p151, p152, p154?p157, p170?p173, p176, p177, p221, p222-?p224, p226, p227 ? all ports are set for input mode upon exiting the reset state. b0 123456b7 (b8 9 10 11 12 13 14 b15) pn0dir pn1dir pn2dir pn3dir pn4dir pn5dir pn6dir pn7dir 00000000 8.3 input/output port related registers
8 8-9 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.3.3 port operation mode registers p7 operation mode register (p7mod) b bit name function r w 8 p70mod 0: p70 r w port p70 operation mode bit 1: bclk/wr# 9 p71mod 0: p71 r w port p71 operation mode bit 1: wait# 10 p72mod 0: p72 r w port p72 operation mode bit 1: hreq# 11 p73mod 0: p73 r w port p73 operation mode bit 1: hack# 12 p74mod 0: p74 r w port p74 operation mode bit 1: rtdtxd/txd3 (note 1) 13 p75mod 0: p75 r w port p75 operation mode bit 1: rtdrxd/rxd3 (note 1) 14 p76mod 0: p76 r w port p76 operation mode bit 1: rtdack/ctx1 (note 1) 15 p77mod 0: p77 r w port p77 operation mode bit 1: rtdclk/crx1 (note 1) note 1: these functions are selected using the p7 peripheral function select register. p8 operation mode register (p8mod) b bit name function r w 0,1 no function assigned. fix to "0". 00 2 p82mod 0: p82 r w port p82 operation mode bit 1: txd0 3 p83mod 0: p83 r w port p83 operation mode bit 1: rxd0 4 p84mod 0: p84 r w port p84 operation mode bit 1: sclki0/sclko0 5 p85mod 0: p85 r w port p85 operation mode bit 1: txd1 6 p86mod 0: p86 r w port p86 operation mode bit 1: rxd1 7 p87mod 0: p87 r w port p87 operation mode bit 1: sclki1/sclko1 note: ? ports p80 and p81 are nonexistent. 8.3 input/output port related registers b8 9 1011121314b15 p70mod p71mod p72mod p73mod p74mod p75mod p76mod p77mod 00000000 b0123456b7 p82mod p83mod p84mod p85mod p86mod p87mod 00000000
8 8-10 input/output ports and pin functions 32176 group user?s manual (rev.1.01) p9 operation mode register (p9mod) b bit name function r w 8?10 no function assigned. fix to "0". 00 11 p93mod 0: p93 r w port p93 operation mode bit 1: to16 12 p94mod 0: p94 r w port p94 operation mode bit 1: to17 13 p95mod 0: p95 r w port p95 operation mode bit 1: to18 14 p96mod 0: p96 r w port p96 operation mode bit 1: to19 15 p97mod 0: p97 r w port p97 operation mode bit 1: to20 note: ? ports p90?p92 are nonexistent. p10 operation mode register (p10mod) b bit name function r w 0 p100mod 0: p100 r w port p100 operation mode bit 1: to8 1 p101mod 0: p101 r w port p101 operation mode bit 1: to9 2 p102mod 0: p102 r w port p102 operation mode bit 1: to10 3 p103mod 0: p103 r w port p103 operation mode bit 1: to11 4 p104mod 0: p104 r w port p104 operation mode bit 1: to12 5 p105mod 0: p105 r w port p105 operation mode bit 1: to13 6 p106mod 0: p106 r w port p106 operation mode bit 1: to14 7 p107mod 0: p107 r w port p107 operation mode bit 1: to15 8.3 input/output port related registers b8 9 1011121314b15 p93mod p94mod p95mod p96mod p97mod 00000000 b0123456b7 p100mod p101mod p102mod p103mod p104mod p105mod p106mod p107mod 00000000
8 8-11 input/output ports and pin functions 32176 group user?s manual (rev.1.01) p11 operation mode register (p11mod) b bit name function r w 8 p110mod 0: p110 r w port p110 operation mode bit 1: to0 9 p111mod 0: p111 r w port p111 operation mode bit 1: to1 10 p112mod 0: p112 r w port p112 operation mode bit 1: to2 11 p113mod 0: p113 r w port p113 operation mode bit 1: to3 12 p114mod 0: p114 r w port p114 operation mode bit 1: to4 13 p115mod 0: p115 r w port p115 operation mode bit 1: to5 14 p116mod 0: p116 r w port p116 operation mode bit 1: to6 15 p117mod 0: p117 r w port p117 operation mode bit 1: to7 p12 operation mode register (p12mod) b bit name function r w 0?3 no function assigned. fix to "0". 00 4 p124mod 0: p124 r w port p124 operation mode bit 1: tclk0 5 p125mod 0: p125 r w port p125 operation mode bit 1: tclk1 6 p126mod 0: p126 r w port p126 operation mode bit 1: tclk2 7 p127mod 0: p127 r w port p127 operation mode bit 1: tclk3 note: ? ports p120?p123 are nonexistent. 8.3 input/output port related registers b0123456b7 p124mod p125mod p126mod p127mod 00000000 b8 9 1011121314b15 p110mod p111mod p112mod p113mod p114mod p115mod p116mod p117mod 00000000
8 8-12 input/output ports and pin functions 32176 group user?s manual (rev.1.01) p13 operation mode register (p13mod) < address: h?0080 074d> b bit name function r w 8 p130mod 0: p130 r w port p130 operation mode bit 1: tin16 9 p131mod 0: p131 r w port p131 operation mode bit 1: tin17 10 p132mod 0: p132 r w port p132 operation mode bit 1: tin18 11 p133mod 0: p133 r w port p133 operation mode bit 1: tin19 12 p134mod 0: p134 r w port p134 operation mode bit 1: tin20 13 p135mod 0: p135 r w port p135 operation mode bit 1: tin21 14 p136mod 0: p136 r w port p136 operation mode bit 1: tin22 15 p137mod 0: p137 r w port p137 operation mode bit 1: tin23 p15 operation mode register (p15mod) b bit name function r w 8 p150mod 0: p150 r w port p150 operation mode bit 1: tin0 9, 10 no function assigned. fix to "0". 00 11 p153mod 0: p153 r w port p153 operation mode bit 1: tin3 12-15 no function assigned. fix to "0". 00 note : ? ports p151, p152 and p154?p157 are nonexistent. 8.3 input/output port related registers b8 9 1011121314b15 p150mod p153mod 00000000 b8 9 1011121314b15 p130mod p131mod p132mod p133mod p134mod p135mod p136mod p137mod 00000000
8 8-13 input/output ports and pin functions 32176 group user?s manual (rev.1.01) p17 operation mode register (p17mod) b bit name function r w 8?11 no function assigned. fix to "0". 00 12 p174mod 0: p174 r w port p174 operation mode bit 1: txd2 13 p175mod 0: p175 r w port p175 operation mode bit 1: rxd2 14, 15 no function assigned. fix to "0". 00 notes: ? ports p170?p173, p176 and p177 are nonexistent. p22 operation mode register (p22mod) b bit name function r w 0 p220mod 0: p220 r w port p220 operation mode bit 1: ctx0 1? 7 no function assigned. fix to "0". 00 note 1: port p221 is a can input-only pin. note 2: the pin function for p225 changes depending on the mod0 and mod1pin settings. note 3: ports p222?p224, p226 and p227 are nonexistent. 8.3 input/output port related registers b0123456b7 p220mod 00000000 b8 9 1011121314b15 p174mod p175mod 00000000
8 8-14 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.3 input/output port related registers 8.3.4 port peripheral function select register p7 peripheral function select register (p7smod) b bit name function r w 8?11 no function assigned. fix to "0". 00 12 p74smod 0: rtdtxd r w port p74 peripheral function select bit 1: txd3 13 p75smod 0: rtdrxd r w port p75 peripheral function select bit 1: rxd3 14 p76smod 0: rtdack r w port p76 peripheral function select bit 1: ctx1 15 p77smod 0: rtdclk r w port p77 peripheral function select bit 1: crx1 the p7 peripheral function select register is used to select a peripheral function when the corresponding bit in the p7 operation mode register = "1". to use this register, first rewrite it when the p7 operation mode register = "0", and then set the p7 operation mode register to "1" to enable peripheral functions. b8 9 1011121314b15 p74smod p75smod p76smod p77smod 00000000
8 8-15 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.3.5 port input special function control register port input special function control register (picnt) 9 1011121314b15 b8 pien0 pisel x s ta t 0 00 0 0 0 0 0 b bit name function r w 8?10 no function assigned. fix to "0". 00 11 xstat 0: xin os cillating r (note 1) xin oscillation status bit 1: xin inactive 12, 13 no function assigned. fix to "0". 00 14 pisel 0: content of port output latch r w port input data select bit 1: port pin level 15 pien0 0: disable input r w port input enable bit 1: enable input note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. (1) xstat (xin oscillation status) bit (bit 11) 1) conditions under which xstat is set to "1" xstat is set to "1" upon detecting that xin oscillation has stopped. when xin remains at the same level for a predetermined time (3 bclk periods up to 4 bclk periods), xin oscillation is assumed to have stopped. when operating normally, xin changes state (high or low) once every bclk period. 2) conditions under which xstat is cleared to "0" xstat is cleared to "0" by a system reset or by writing "0". if xstat is cleared at the same time it is set in (1) above, the former has priority. writing "1" to xstat is ignored. 3) method for using xstat to detect xin oscillation stoppage because the m32r/ecu internally contains a pll, the internal clock remains active even when xin oscilla- tion has stopped. by reading xstat without clearing it never once after reset, it is possible to know whether xin has ever stopped since the reset signal was deasserted. similarly, by reading xstat after clearing it by writing "0", it is possible to know the current oscillating status of xin. (however, there must be an interval of at least 10 bclk periods (20 cpu clock periods) between read and write.) 8.3 input/output port related registers
8 8-16 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.3 input/output port related registers read xstat (1) to know whether xin oscillation has ever stopped after being reset write xstat = 0 (2) to know the current status of xin oscillation wait for 20 cpu clock periods or more read xstat wait before inspecting xstat figure 8.3.1 procedure for setting xstat (2) pisel (port input data select) bit (bit 14) when the port direction register is set for output, this bit selects the target data to be read from the port data register. at this time, this bit is unaffected by the port operation mode register. table 8.3.1 pisel bit settings and the target data to be read from the port data register direction register pisel settings target data to be read 0 (input) 0/1 port pin level 1 (output) 0 port output latch 1 port pin level
8 8-17 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.3 input/output port related registers (3) pien0 (port input enable) bit (bit 15) this bit is used to prevent current from flowing into the port input pins. because the input/output ports are disabled against input after reset, if any ports need to be used in input mode they must be enabled for input by setting this bit to "1". when disabled against input, the input/output ports are in a state equivalent to a situation where the pin has a low-level input applied. consequently, if a peripheral input function is selected for any port while disabled against input by using the port operation mode register, the port may operate unexpectedly due to the low- level input on it. the following shows the procedure for selecting a peripheral input function. (1) enable the port for input when its pin level is valid (high or low) (2) select a function using the port operation mode bit during boot mode, the pins shared with serial i/o functions are enabled for input and can therefore be protected against current flowing in from the pins other than serial i/o functions during flash programming by clearing pien0. the table below lists the pins that can be controlled by the pien0 bit in each operation mode. table 8.3.2 pins controllable by pien0 bit mode name controllable pins uncontrolled pins p00?p07, p10?p17, p20?p27 p221, fp, sbi#, mod0, mod1, mod2, reset# p30?p37, p41?p47, p61?p63 single-chip p70?p77, p82?p87, p93?p97 p100?p107, p110?p117, p124?p127 p130?p137, 150, p153, p174, p175 p220, p225 p61?p63, p70?p77, p82?p87 p00?p07, p10?p17 external extension p93?p97, p100?p107, p110?p117 p20?p27, p30?p37 microprocessor p124?p127, p130?p137 p41?p47, p221, p225 p150, p153, p174, p175, p220 fp, sbi#, mod0, mod1, mod2, reset# p00?p07, p10?p17, p20?p27 p82?p87, p174, p175 boot p30?p37, p41?p47, p61?p63 p221, fp, sbi#, mod0, mod1, mod2, reset# (single-chip) p67, p70?p77, p93?p97 p100?p107, p110?p117, p124?p127 p130?p137, p150, p153, p220, p225
8 8-18 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.4 port input level switching function the port input level switching function allows the port threshold to be switched to one of three voltage levels (with or without schmitt as selected) in units of the following port group. this can be set to the following registers in units of group . group 0: p00?p07, p10?p17, p20?p27, p30?p37, p41?p47, p70?p73, p225 group 1: p82?p87, p174?p177 group 3: p93?p97, p110?p117 group 4: p124?p127 group 5: p61?p63, sbi# group 6: p74?p77, p100?p107 group 7: p220, p221 group 8: p130?p137, p150?p153 port group 0,1 input level setting register (pg01lev) port group 3 input level setting register (pg3lev) port group 4,5 input level setting register (pg45lev) port group 6,7 input level setting register (pg67lev) port group 8 input level setting register (pg8lev) note: ? the pg8lev register bits 4?7 have no functions assigned. 8.4 port input level switching function b8 9 1011121314b15 wf3sel pt3sel vt3sel0 vt3sel1 00000001 b0123456b7 wf0sel pt0sel vt0sel0 vt0sel1 wf1sel pt1sel vt1sel0 vt1sel1 00010001 b0123456b7 wf4sel pt4sel vt4sel0 vt4sel1 wf5sel pt5sel vt5sel0 vt5sel1 00010001 b8 9 1011121314b15 wf6sel pt6sel vt26el0 vt26el1 wf7sel pt7sel vt7sel0 vt7sel1 00010001 b0123456b7 wf8sel pt8sel vt8sel0 vt8sel1 00010000
8 8-19 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.4 port input level switching function b bit name function r w 0(4) wfnsel 0: select standard input for each pin r w 8(12) group n dual-function input select bit 1: sel ect threshold switching function 1(5) ptnsel 0: select cmos input r w 9(13) group n port input select bit 1: select schmitt input 2?3 vtnsel r w (6?7) group n input threshold select bit 00: select 0.35 vcce 10?11 01: select 0.5 vcce (14?15) 10: select 0.7 vcce 11: settings inhibited 00: vt+ = 0.5 vcce vt? = 0.35 vcce 01: settings inhibited 10: vt+ = 0.7 vcce vt? = 0.35 vcce 11: vt+ = 0.7 vcce vt? = 0.5vcce figure 8.4.1 port level switching function vt+ vt- schmitt peripheral function input port input pin 0.7vcce 0.5vcce 0.35vcce cmos s s s s s wfnsel ptnsel vtnsel threshold input function enable standard input level for each peripheral function pin
8 8-20 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.5 port peripheral circuits figures 8.5.1 through 8.5.5 show the peripheral circuit diagrams of the input/output ports described in the preceding pages. figure 8.5.1 port peripheral circuit diagram (1) p00?p07(db0?db7) p10?p17(db8?db15) p20?p27(a23?a30) p30?p37(a15?a22) p41(blw#/ble#) p42(bhw#/bhe#) p43(rd#) p44(cs0#) p45(cs1#) p46?p47(a13?a14) p61?p63 p225(a12) p83(rxd0) p86(rxd1) p124?p127(tclk0?tclk3) p150, p153(tin0, tin3) p175(rxd2) note 1: for details about the port level switching function, see section 8.4, "port input level switching function." notes:  during external extension and processor modes, p00-p07, p10-p17, p20-p27, p30-p37, p41-p47, and p225 are external bus interface control signal pins, but their functional description in this block diagram is omitted.  the circle denotes a pin.  the symbol denotes a parasitic diode. make sure the voltage applied to each pin does not exceed the vcce voltage.  the input capacitance of each pin is approximately 10 pf. data bus data bus port output latch input function enable peripheral function input direction register direction register port output latch operation mode register port level switching function (standard: peripheral ttl) (note 1) (note 1) input function enable port level switching function (standard: peripheral schmitt) 8.5 port peripheral circuits
8 8-21 input/output ports and pin functions 32176 group user?s manual (rev.1.01) figure 8.5.2 port peripheral circuit diagram (2) 8.5 port peripheral circuits sbi# p221/crx data bus sbi# , crx p72(hreq#) hreq# data bus direction register port output latch operation mode register port level switching function (standard: peripheral schmitt) (note 1) port level switching function (standard: peripheral schmitt) (note 1) p71(wait#) data bus wait# direction register port output latch operation mode register port level switching function (standard: peripheral schmitt) input function enable (note 1) input function enable note 1: for details about the port level switching function, see section 8.4, "port input level switching function." notes:  the circle denotes a pin.  the symbol denotes a parasitic diode. make sure the voltage applied to each pin does not exceed the vcce voltage.  the input capacitance of each pin is approximately 10 pf.
8 8-22 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.5 port peripheral circuits p70(bclk/wr#) p73(hack#) p76(rtdack) p82(txd0) p85(txd1) p93?p97(to16?to20) p100?p107(to8?to15) p110?p117(to0?to7) p174(txd2) p220(ctx0) data bus peripheral function output direction register port output latch operation mode register port level switching function (standard: peripheral schmitt) input function enable (note 1) p84(sclki0,sclko0) p87(sclki1,sclko1) data bus sclkii input sclkoi output direction register port output latch operation mode register port level switching function (standard: peripheral schmitt) input function enable (note 1) uart/csio function select bit internal/external clock select bit note 1: for details about the port level switching function, see section 8.4, "port input level switching function." notes:  the circle denotes a pin.  the symbol denotes a parasitic diode. make sure the voltage applied to each pin does not exceed the vcce voltage.  the input capacitance of each pin is approximately 10 pf. figure 8.5.3 port peripheral circuit diagram (3)
8 8-23 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.5 port peripheral circuits figure 8.5.4 port peripheral circuit diagram (4) reset# xin jtrst reset#, xin, jtrst mod0 mod1 mod0, mod1 fp fp jtdi jtck jtms jtdi, jtck, jtms jtdo jtdo vcci vcce vdd avcc0 vcci, vcce, vdd , avcc0 ad0in0?15 vref0 xout ad0in0?15, vref0, xout notes:  the circle denotes a pin.  the symbol denotes a parasitic diode. make sure the voltage applied to each pin does not exceed the vcce voltage.  the input capacitance of each pin is approximately 10 pf.
8 8-24 input/output ports and pin functions 32176 group user?s manual (rev.1.01) figure 8.5.5 port peripheral circuit diagram (5) p75(rtdrxd/rxd3) p77(rtdclk/crx1) p74(rtdtxd/txd3) p76(rtdack/cxt1) data bus peripheral function input 2 peripheral function input 1 direction register port output latch operation mode register port level switching function (standard: peripheral schmitt) input function enable (note 1) p7 peripheral function select register data bus peripheral function output 2 peripheral function output 1 direction register port output latch operation mode register port level switching function (standard: no peripheral input) input function enable (note 1) p7 peripheral function select register note 1: for details about the port level switching function, see section 8.4, "port input level switching function." notes:  the circle denotes a pin.  the symbol denotes a parasitic diode. make sure the voltage applied to each pin does not exceed the vcce voltage.  the input capacitance of each pin is approximately 10 pf. 8.5 port peripheral circuits
8 8-25 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.6 precautions on input/output ports ? when using input/output ports in output mode because the value of the port data register is undefined when exiting the reset state, the port data register must have its initial value set in it before the port direction register can be set for output. conversely, if the port direction register is set for output before setting data in the port data register, the port data register outputs an undefined value until any data is written into it. ? about the port input disable function because the input/output ports are disabled against input after reset, they must be enabled for input by setting the port input enable (pien0) bit to "1" before their input functions can be used. when disabled against input, the input/output ports are in a state equivalent to a situation where the pin has a low-level input applied. consequently, if a peripheral input function is selected for any port while disabled against input by using the port operation mode register, the port may operate unexpectedly due to the low-level input on it. 8.6 precautions on input/output ports
8 8-26 input/output ports and pin functions 32176 group user?s manual (rev.1.01) 8.6 precautions on input/output ports this page is blank for reasons of layout.
chapter 9 dmac 9.1 outline of the dmac 9.2 dmac related registers 9.3 functional description of the dmac 9.4 precautions about the dmac
9 9-2 dmac 32176 group user?s manual (rev.1.01) 9.1 outline of the dmac the microcomputer internally contains a 10-channel dmac (direct memory access controller). it allows data to be transferred at high speed between internal peripheral i/os, between internal ram and internal peripheral i/o, or between internal rams, as initiated by a software trigger or requested from an internal peripheral i/o. table 9.1.1 outline of the dmac item description number of channels 10 channels transfer request sources ? software trigger ? request from internal peripheral i/os: a-d converter, multijunction timer, serial i/o (reception completed, transmit buffer empty) or can ? dma channels can be cascaded (note 1) maximum number of 256 times times transferred transferable address ? 64 kbytes (address space from h?0080 0000 to h?0080 ffff) space ? transfers between in ternal peripheral i/os, between internal ram and internal peripheral i/o, and between internal rams are supported. transfer data size 16 or 8 bits transfer method single transfer dma (control of the internal bus is relinquished for each transfer performed), dual- address transfer transfer mode single transfer mode direction of transfer one of three modes can be selected for the source and destination: ? address fixed ? address incremental ? ring buffered channel priority dma0 > dma1 > dma2 > dma3 > dma4 > dma5 > dma6 > dma7 > dma8 > dma9 (priority is fixed) maximum transfer rate 13.3 mbytes per second (when internal peripheral clock bclk = 20 mhz) interrupt request group interrupt request can be generated when each transfer count register underflows. transfer area 64 kbytes from h?0080 0000 to h?0080 ffff note 1: the dma channels can be cascaded in the manner described below. ? start dma transfer on dma1 upon completion of one dma transfer on dma0 ? start dma transfer on dma2 upon completion of one dma transfer on dma1 ? start dma transfer on dma0 upon completion of one dma transfer on dma2 ? start dma transfer on dma4 upon completion of one dma transfer on dma3 ? start dma transfer on dma6 upon completion of one dma transfer on dma5 ? start dma transfer on dma7 upon completion of one dma transfer on dma6 ? start dma transfer on dma5 upon completion of one dma transfer on dma7 ? start dma transfer on dma9 upon completion of one dma transfer on dma8 ? start dma transfer on dma5 upon completion of all dma transfers on dma0 (upon underflow of the transfer count register) 9.1 outline of the dmac
9 dmac 9-3 32176 group user?s manual (rev.1.01) figure 9.1.1 block diagram of the dmac 9.1 outline of the dmac s dma0 udf end dma1 udf end dma2 udf end dma3 udf end dma4 udf end dma5 udf end dma6 udf end dma7 udf end dma8 udf end dma9 udf end s s s s s s s s s ad0 conversion completed tio8_udf software start software start software start sio0_txd sio1_rxd software start sio0_rxd software start software start dma0?4 interrupt dma5?9 interrupt sio2_rxd sio1_txd software start sio2_txd software start sio3_rxd software start can0_s0/s15 (note 1) tin0(p150) (note 1) tin19(p133) (note 1) tin20(p134) sio3_txd software start (note 1) tin18(p132) can0_s1/s14 can1_s0/s15 can1_s1/s14 note 1: indicates edge select output at the timer input pin. 0123 input event bus output event bus 3210 3210 0123
9 9-4 dmac 32176 group user?s manual (rev.1.01) 9.2 dmac related registers the diagram below shows a memory map of the dmac related registers. dmac related register map (1/2) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0400 dma0?4 interrupt request status register dma0?4 interrupt request mask register 9-18 (dm04itst) (dm04itmk) 9-19 (use inhibited area) h'0080 0408 dma5?9 interrupt request status register dma5?9 interrupt request mask register 9-18 (dm59itst) (dm59itmk) 9-19 (use inhibited area) h'0080 0410 dma0 channel control register dma0 transfer count register 9-6 (dm0cnt) (dm0tct) 9-15 h'0080 0412 dma0 source address register 9-13 (dm0sa) h'0080 0414 dma0 destination address register 9-14 (dm0da) h'0080 0416 (use inhibited area) h'0080 0418 dma5 channel control register dma5 transfer count register 9-8 (dm5cnt) (dm5tct) 9-15 h'0080 041a dma5 source address register 9-13 (dm5sa) h'0080 041c dma5 destination address register 9-14 (dm5da) h'0080 041e (use inhibited area) h'0080 0420 dma1 channel control register dma1 transfer count register 9-6 (dm1cnt) (dm1tct) 9-15 h'0080 0422 dma1 source address register 9-13 (dm1sa) h'0080 0424 dma1 destination address register 9-14 (dm1da) h'0080 0426 (use inhibited area) h'0080 0428 dma6 channel control register dma6 transfer count register 9-9 (dm6cnt) (dm6tct) 9-15 h'0080 042a dma6 source address register 9-13 (dm6sa) h'0080 042c dma6 destination address register 9-14 (dm6da) h'0080 042e (use inhibited area) h'0080 0430 dma2 channel control register dma2 transfer count register 9-7 (dm2cnt) (dm2tct) 9-15 h'0080 0432 dma2 source address register 9-13 (dm2sa) h'0080 0434 dma2 destination address register 9-14 (dm2da) h'0080 0436 (use inhibited area) h'0080 0438 dma7 channel control register dma7 transfer count register 9-9 (dm7cnt) (dm7tct) 9-15 h'0080 043a dma7 source address register 9-13 (dm7sa) h'0080 043c dma7 destination address register 9-14 (dm7da) h'0080 043e (use inhibited area) 9.2 dmac related registers | |
9 dmac 9-5 32176 group user?s manual (rev.1.01) 9.2 dmac related registers dmac related register map (2/2) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0440 dma3 channel control register dma3 transfer count register 9-7 (dm3cnt) (dm3tct) 9-15 h'0080 0442 dma3 source address register 9-13 (dm3sa) h'0080 0444 dma3 destination address register 9-14 (dm3da) h'0080 0446 (use inhibited area) h'0080 0448 dma8 channel control register dma8 transfer count register 9-10 (dm8cnt) (dm8tct) 9-15 h'0080 044a dma8 source address register 9-13 (dm8sa) h'0080 044c dma8 destination address register 9-14 (dm8da) h'0080 044e (use inhibited area) h'0080 0450 dma4 channel control register dma4 transfer count register 9-8 (dm4cnt) (dm4tct) 9-15 h'0080 0452 dma4 source address register 9-13 (dm4sa) h'0080 0454 dma4 destination address register 9-14 (dm4da) h'0080 0456 (use inhibited area) h'0080 0458 dma9 channel control register dma9 transfer count register 9-10 (dm9cnt) (dm9tct) 9-15 h'0080 045a dma9 source address register 9-13 (dm9sa) h'0080 045c dma9 destination address register 9-14 (dm9da) h'0080 045e (use inhibited area) h'0080 0460 dma0 software request generation register 9-12 (dm0sri) h'0080 0462 dma1 software request generation register 9-12 (dm1sri) h'0080 0464 dma2 software request generation register 9-12 (dm2sri) h'0080 0466 dma3 software request generation register 9-12 (dm3sri) h'0080 0468 dma4 software request generation register 9-12 (dm4sri) (use inhibited area) h'0080 0470 dma5 software request generation register 9-12 (dm5sri) h'0080 0472 dma6 software request generation register 9-12 (dm6sri) h'0080 0474 dma7 software request generation register 9-12 (dm7sri) h'0080 0476 dma8 software request generation register 9-12 (dm8sri) h'0080 0478 dma9 software request generation register 9-12 (dm9sri) |
9 9-6 dmac 32176 group user?s manual (rev.1.01) 9.2.1 dma channel control registers dma0 channel control register (dm0cnt) b bit name function r w 0 mdsel0 0: normal mode r w dma0 transfer mode select bit 1: ring buffer mode 1 treqf0 0: transfer not requested r(note 1) dma0 transfer request flag bit 1: transfer requested 2, 3 reqsl0 00: software start or one dma2 transfer completed r w dma0 request source select bit 01: a-d0 conversion completed 10: mjt (tio8_udf) 11: mjt (input event bus 2) 4 tenl0 0: disable transfer r w dma0 transfer enable bit 1: enable transfer 5 tszsl0 0: 16 bits r w dma0 transfer size select bit 1: 8 bits 6 sadsl0 0: fixed r w dma0 source address direction select bit 1: increment 7 dadsl0 0: fixed r w dma0 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. dma1 channel control register (dm1cnt) b bit name function r w 0 mdsel1 0: normal mode r w dma1 transfer mode select bit 1: ring buffer mode 1 treqf1 0: transfer not requested r(note 1) dma1 transfer request flag bit 1: transfer requested 2, 3 reqsl1 00: software start r w dma1 request source select bit 01: mjt (output event bus 0) 10: settings inhibited 11: one dma0 transfer completed 4 tenl1 0: disable transfer r w dma1 transfer enable bit 1: enable transfer 5 tszsl1 0: 16 bits r w dma1 transfer size select bit 1: 8 bits 6 sadsl1 0: fixed r w dma1 source address direction select bit 1: increment 7 dadsl1 0: fixed r w dma1 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. 9.2 dmac related registers b0123456b7 mdsel0 treqf0 reqsl0 tenl0 tszsl0 sadsl0 dadsl0 00000000 b0123456b7 mdsel1 treqf1 reqsl1 tenl1 tszsl1 sadsl1 dadsl1 00000000
9 dmac 9-7 32176 group user?s manual (rev.1.01) dma2 channel control register (dm2cnt) b bit name function r w 0 mdsel2 0: normal mode r w dma2 transfer mode select bit 1: ring buffer mode 1 treqf2 0: transfer not requested r(note 1) dma2 transfer request flag bit 1: transfer requested 2, 3 reqsl2 00: software start r w dma2 request source select bit 01: mjt (output event bus 1) 10: mjt (tin18 edge select output) 11: one dma1 transfer completed 4 tenl2 0: disable transfer r w dma2 transfer enable bit 1: enable transfer 5 tszsl2 0: 16 bits r w dma2 transfer size select bit 1: 8 bits 6 sadsl2 0: fixed r w dma2 source address direction select bit 1: increment 7 dadsl2 0: fixed r w dma2 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. dma3 channel control register (dm3cnt) b bit name function r w 0 mdsel3 0: normal mode r w dma3 transfer mode select bit 1: ring buffer mode 1 treqf3 0: transfer not requested r(note 1) dma3 transfer request flag bit 1: transfer requested 2, 3 reqsl3 00: software start r w dma3 request source select bit 01: serial i/o-0 (transmit buffer empty) 10: serial i/o-1 (reception completed) 11: mjt (tin0 edge select output) 4 tenl3 0: disable transfer r w dma3 transfer enable bit 1: enable transfer 5 tszsl3 0: 16 bits r w dma3 transfer size select bit 1: 8 bits 6 sadsl3 0: fixed r w dma3 source address direction select bit 1: increment 7 dadsl3 0: fixed r w dma3 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. 9.2 dmac related registers b0123456b7 mdsel2 treqf2 reqsl2 tenl2 tszsl2 sadsl2 dadsl2 00000000 b0123456b7 mdsel3 treqf3 reqsl3 tenl3 tszsl3 sadsl3 dadsl3 00000000
9 9-8 dmac 32176 group user?s manual (rev.1.01) dma4 channel control register (dm4cnt) b bit name function r w 0 mdsel4 0: normal mode r w dma4 transfer mode select bit 1: ring buffer mode 1 treqf4 0: transfer not requested r(note 1) dma4 transfer request flag bit 1: transfer requested 2, 3 reqsl4 00: software start r w dma4 request source select bit 01: one dma3 transfer completed 10: serial i/o-0 (reception completed) 11: mjt (tin19 edge select output) 4 tenl4 0: disable transfer r w dma4 transfer enable bit 1: enable transfer 5 tszsl4 0: 16 bits r w dma4 transfer size select bit 1: 8 bits 6 sadsl4 0: fixed r w dma4 source address direction select bit 1: increment 7 dadsl4 0: fixed r w dma4 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. dma5 channel control register (dm5cnt) b bit name function r w 0 mdsel5 0: normal mode r w dma5 transfer mode select bit 1: ring buffer mode 1 treqf5 0: transfer not requested r(note 1) dma5 transfer request flag bit 1: transfer requested 2, 3 reqsl5 00: software start or one dma7 transfer completed r w dma5 request source select bit 01: all dma0 transfers completed 10: serial i/o-2 (reception completed) 11: mjt (tin20 edge select output) 4 tenl5 0: disable transfer r w dma5 transfer enable bit 1: enable transfer 5 tszsl5 0: 16 bits r w dma5 transfer size select bit 1: 8 bits 6 sadsl5 0: fixed r w dma5 source address direction select bit 1: increment 7 dadsl5 0: fixed r w dma5 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. 9.2 dmac related registers b0123456b7 mdsel4 treqf4 reqsl4 tenl4 tszsl4 sadsl4 dadsl4 00000000 b0123456b7 mdsel5 treqf5 reqsl5 tenl5 tszsl5 sadsl5 dadsl5 00000000
9 dmac 9-9 32176 group user?s manual (rev.1.01) dma6 channel control register (dm6cnt) b bit name function r w 0 mdsel6 0: normal mode r w dma6 transfer mode select bit 1: ring buffer mode 1 treqf6 0: transfer not requested r(note 1) dma6 transfer request flag bit 1: transfer requested 2, 3 reqsl6 00: software start r w dma6 request source select bit 01: serial i/o-1 (transmit buffer empty) 10: can (can0_s0/s15) 11: one dma5 transfer completed 4 tenl6 0: disable transfer r w dma6 transfer enable bit 1: enable transfer 5 tszsl6 0: 16 bits r w dma6 transfer size select bit 1: 8 bits 6 sadsl6 0: fixed r w dma6 source address direction select bit 1: increment 7 dadsl6 0: fixed r w dma6 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. dma7 channel control register (dm7cnt) b bit name function r w 0 mdsel7 0: normal mode r w dma7 transfer mode select bit 1: ring buffer mode 1 treqf7 0: transfer not requested r(note 1) dma7 transfer request flag bit 1: transfer requested 2, 3 reqsl7 00: software start r w dma7 request source select bit 01: serial i/o-2 (transmit buffer empty) 10: can (can0_s1/s14) 11: one dma6 transfer completed 4 tenl7 0: disable transfer r w dma7 transfer enable bit 1: enable transfer 5 tszsl7 0: 16 bits r w dma7 transfer size select bit 1: 8 bits 6 sadsl7 0: fixed r w dma7 source address direction select bit 1: increment 7 dadsl7 0: fixed r w dma7 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. 9.2 dmac related registers b0123456b7 mdsel6 treqf6 reqsl6 tenl6 tszsl6 sadsl6 dadsl6 00000000 b0123456b7 mdsel7 treqf7 reqsl7 tenl7 tszsl7 sadsl7 dadsl7 00000000
9 9-10 dmac 32176 group user?s manual (rev.1.01) dma8 channel control register (dm8cnt) b bit name function r w 0 mdsel8 0: normal mode r w dma8 transfer mode select bit 1: ring buffer mode 1 treqf8 0: transfer not requested r(note 1) dma8 transfer request flag bit 1: transfer requested 2, 3 reqsl8 00: software start r w dma8 request source select bit 01: mjt (input event bus 0) 10: serial i/o-3 (reception completed) 11: can (can1_s0/s15) 4 tenl8 0: disable transfer r w dma8 transfer enable bit 1: enable transfer 5 tszsl8 0: 16 bits r w dma8 transfer size select bit 1: 8 bits 6 sadsl8 0: fixed r w dma8 source address direction select bit 1: increment 7 dadsl8 0: fixed r w dma8 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. dma9 channel control register (dm9cnt) b bit name function r w 0 mdsel9 0: normal mode r w dma9 transfer mode select bit 1: ring buffer mode 1 treqf9 0: transfer not requested r(note 1) dma9 transfer request flag bit 1: transfer requested 2, 3 reqsl9 00: software start r w dma9 request source select bit 01: serial i/o-3 (transmit buffer empty) 10: can (can1_s1/s14) 11: one dma8 transfer completed 4 tenl9 0: disable transfer r w dma9 transfer enable bit 1: enable transfer 5 tszsl9 0: 16 bits r w dma9 transfer size select bit 1: 8 bits 6 sadsl9 0: fixed r w dma9 source address direction select bit 1: increment 7 dadsl9 0: fixed r w dma9 destination address direction select bit 1: increment note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. 9.2 dmac related registers b0123456b7 mdsel9 treqf9 reqsl9 tenl9 tszsl9 sadsl9 dadsl9 00000000 b0123456b7 mdsel8 treqf8 reqsl8 tenl8 tszsl8 sadsl8 dadsl8 00000000
9 dmac 9-11 32176 group user?s manual (rev.1.01) 9.2 dmac related registers the dma channel control register consists of the bits to select dma transfer mode on each channel, set the dma transfer request flag, select the cause or source of dma request and enable dma transfer, as well as those to set the transfer size and the source/destination address directions. (1) mdseln (dman transfer mode select) bit (bit 0) when performing dma transfer in single transfer mode, this bit selects normal mode or ring buffer mode. setting this bit to "0" selects normal mode and setting it to "1" selects ring buffer mode. in ring buffer mode, transfer begins from the transfer start address and after performing transfers 32 times, control is returned back to the transfer start address, from which transfer operation is repeated. in this case, the transfer count register counts in free-run mode, during which time transfer operation is continued until the transfer enable bit is reset to "0" (to disable transfer). in ring buffer mode, no interrupt is generated at completion of dma transfer. (2) treqfn (dman transfer request flag) bit (bit 1) this flag is set to "1" when a dma transfer request occurs, and is cleared to "0" when the transfer for that transfer request is completed. reading this flag helps to know dma transfer requests on each channel. writing "0" to this bit clears the generated dma transfer request. writing "1" has no effect; the bit retains the value it had before the write. if a new dma transfer request occurs on a channel for which the dma transfer request flag has already been set to "1", the next dma transfer request is not accepted until the transfer being performed on that channel is completed. (3) reqsln (dman request source select) bits (bits 2?3) these bits select the cause or source of dma request on each dma channel. (4) tenln (dman transfer enable) bit (bit 4) setting this bit to "1" enables transfer, and the channel is made ready for dma transfer. when all transfers on that channel are completed (i.e., the transfer counter register underflows), the bit is cleared to "0". setting this bit to "0" disables transfer. however, if a transfer request has already been accepted, transfers on that channel are not disabled until after the requested transfer is completed. (5) tszsln (dman transfer size select) bit (bit 5) this bit selects the number of bits to be transferred in one dma transfer operation (the unit of one transfer). the unit of one transfer is 16 bits when tszsl = "0" or 8 bits when tszsl = "1". (6) sadsln (dman source address direction select) bit (bit 6) this bit selects the direction in which the source address changes. this mode can be selected from two choices: address fixed or address incremental. (7) dadsln (dman destination address direction select) bit (bit 7) this bit selects the direction in which the destination address changes. this mode can be selected from two choices: address fixed or address incremental.
9 9-12 dmac 32176 group user?s manual (rev.1.01) 9.2 dmac related registers 9.2.2 dma software request generation registers dma0 software request generation register (dm0sri) dma1 software request generation register (dm1sri) dma2 software request generation register (dm2sri) dma3 software request generation register (dm3sri) dma4 software request generation register (dm4sri) dma5 software request generation register (dm5sri) dma6 software request generation register (dm6sri) dma7 software request generation register (dm7sri) dma8 software request generation register (dm8sri) dma9 software request generation register (dm9sri) b bit name function r w 0?15 dm0sri?dm9sri dma transfer request is generated by writing any ? w dma software request generation data to these bits. note: ? this register may be accessed in either bytes or halfwords. the dma software request generation register is used to generate dma transfer requests in software. a dma transfer request can be generated by writing any data to this register when ?software start? has been selected for the cause of dma request. (1) dm0sri?dm9sri (dma software request generation) a software dma transfer request is generated by writing any data to this register in halfword (16 bits) or in byte (8 bits) beginning with an even or odd address when ?software start? is selected as the cause of dma request (by setting the dma channel control register bits 2?3 to ?00?). b01234567891011121314b15 dm0sri-dm9sri ? ???????????????
9 dmac 9-13 32176 group user?s manual (rev.1.01) 9.2.3 dma source address registers dma0 source address register (dm0sa) dma1 source address register (dm1sa) dma2 source address register (dm2sa) dma3 source address register (dm3sa) dma4 source address register (dm4sa) dma5 source address register (dm5sa) dma6 source address register (dm6sa) dma7 source address register (dm7sa) dma8 source address register (dm8sa) dma9 source address register (dm9sa) b bit name function r w 0?15 dm0sa?dma9sa source address bits a16?a31 r w dma source address (a0?a15 are fixed to h?0080) note: ? this register must always be accessed in halfwords. the dma source address register is used to set the source address of dma transfer in such a way that bit 0 and bit 15 correspond to a16 and a31, respectively. because this register is comprised of a current register, the values read from this register are always the current value. when dma transfer finishes (i.e., the transfer count register underflows), the value in this register if ?address fixed? is selected, is the same source address that was set in it before the dma transfer began; if ?address incremental? is selected, the value in this register is the last transfer address + 1 (for 8-bit transfer) or the last transfer address + 2 (for 16-bit transfer). the dma source address register must always be accessed in halfwords (16 bits) beginning with an even address. if accessed in bytes, the value in this register is undefined. (1) dm0sa?dm9sa (source address a16?a31) set this register to specify the source address of dma transfer in the internal i/o or ram space from the address h?0080 0000 to the address h?0080 ffff. the 16 high-order source address bits (a0?a15) are always fixed to h?0080. use this register to set the 16 low-order source address bits (with bit 0 corresponding to the source address a16, and bit 15 corresponding to the source address a31). 9.2 dmac related registers b01234567891011121314b15 dm0sa-dm9sa ? ???????????????
9 9-14 dmac 32176 group user?s manual (rev.1.01) 9.2.4 dma destination address registers dma0 destination address register (dm0da) dma1 destination address register (dm1da) dma2 destination address register (dm2da) dma3 destination address register (dm3da) dma4 destination address register (dm4da) dma5 destination address register (dm5da) dma6 destination address register (dm6da) dma7 destination address register (dm7da) dma8 destination address register (dm8da) dma9 destination address register (dm9da) b bit name function r w 0?15 dm0da?dm9da destination address bits a16?a31 r w dma destination address (a0?a15 are fixed to h?0080) note: ? this register must always be accessed in halfwords the dma destination address register is used to set the destination address of dma transfer in such a way that bit 0 and bit 15 correspond to a16 and a31, respectively. because this register is comprised of a current register, the values read from this register are always the current value. when dma transfer finishes (i.e., the transfer count register underflows), the value in this register if ?address fixed? is selected, is the same source address that was set in it before the dma transfer began; if ?address incremental? is selected, the value in this register is the last transfer address + 1 (for 8-bit transfer) or the last transfer address + 2 (for 16-bit transfer). the dma destination address register must always be accessed in halfwords (16 bits) beginning with an even address. if accessed in bytes, the value in this register is undefined. (1) dm0da?dm9da (destination address bits a16?a31) set this register to specify the destination address of dma transfer in the internal i/o or ram space from the address h?0080 0000 to the address h?0080 ffff. the 16 high-order destination address bits (a0?a15) are always fixed to h?0080. use this register to set the 16 low-order destination address bits (with bit 0 corresponding to the destination address a16, and bit 15 corresponding to the destination address a31). 9.2 dmac related registers b01234567891011121314b15 dm0da-dm9da ? ???????????????
9 dmac 9-15 32176 group user?s manual (rev.1.01) 9.2.5 dma transfer count registers dma0 transfer count register (dm0tct) dma1 transfer count register (dm1tct) dma2 transfer count register (dm2tct) dma3 transfer count register (dm3tct) dma4 transfer count register (dm4tct) dma5 transfer count register (dm5tct) dma6 transfer count register (dm6tct) dma7 transfer count register (dm7tct) dma8 transfer count register (dm8tct) dma9 transfer count register (dm9tct) b bit name function r w 8?15 dm0tct?dm9tct dma transfer count r w dma transfer count (has no effect during ring buffer mode) the dma transfer count register is used to set the number of times data is transferred on each channel. however, the value in this register has no effect during ring buffer mode. the transfer count is the (value set in the transfer count register + 1). because the dma transfer count register is comprised of a current register, the values read from this register are always the current value. (however, if the register is read in a cycle immediately after transfer, the value obtained is one that was stored in the count register before the transfer began.) when transfer finishes, this count register underflows and the value read from it is h?ff. when transfer is enabled, this register is protected in hardware and cannot be accessed for write. during ring buffer mode, the register counts down in free-run mode and continues counting until transfer is disabled. no interrupt is generated at underflow. if any cascaded channel exists, each time one dma transfer (byte or halfword) is completed or when all trans- fers on a channel are completed (i.e., the transfer count register underflows), transfer on the cascaded channel starts. 9.2 dmac related registers b8 9 1011121314b15 dm0tct-dm9tct ????????
9 9-16 dmac 32176 group user?s manual (rev.1.01) 9.2 dmac related registers 9.2.6 dma interrupt related registers the dma interrupt related registers are used to control the interrupt request signals sent from the dmac to the interrupt controller. (1) interrupt request status bit this status bit is used to determine whether there is an interrupt request. when an interrupt request occurs, this bit is set in hardware (cannot be set in software). the status bit is cleared by writing "0". writing "1" has no effect; the bit retains the status it had before the write. because this status bit is unaffected by the interrupt request mask bit, it can be used to inspect the operating status of peripheral functions. in interrupt handling, make sure that within the grouped interrupt request status, only the status bit for the interrupt request that has been serviced is cleared. if the status bit for any interrupt request that has not been serviced is cleared, the pending interrupt request is cleared simultaneously with its status bit. (2) interrupt request mask bit this bit is used to disable unnecessary interrupt requests within the grouped interrupt request. set this bit to "0" to enable interrupt requests or "1" to disable interrupt requests. figure 9.2.1 interrupt request status and mask registers to the interrupt controller interrupt request from each peripheral function interrupt request status data bus set group interrupt interrupt request enabled clear f/f f/f data = 0
9 dmac 9-17 32176 group user?s manual (rev.1.01) 9.2 dmac related registers figure 9.2.2 example for clearing interrupt request status b4 5 b7 interrupt request status initial state event occurs on bit 6 interrupt request event occurs on bit 4 only bit 6 cleared bit 4 data retained b4 5 b7 1 1 0 1 write to the interrupt request status example for clearing interrupt request status 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 program example istreg = 0xfd; /* clear istat1 (0x02 bit) only */  to clear the interrupt request status register 0 (istreg) interrupt request status 1, istat1 (0x02 bit) to clear an interrupt request status, always be sure to write "1" to all other interrupt request status bits. at this time, avoid using a logic operation like the one shown below. because it requires three step-istreg read, logic operation and write, if another interrupt request occurs between the read and write, status may be inadvertently cleared. b4 5 6 b7 interrupt request status event occurs on bit 6 event occurs on bit 4 only bit 6 cleared bit 4 also cleared 0 0 1 0 1 0 1 0 0 0 0 0 read 0 0 1 0 0 0 0 0 clear bit 6 (and'ing with 1101) write 6 6 istreg &= 0xfd; /* clear istat1 (0x02 bit) only */
9 9-18 dmac 32176 group user?s manual (rev.1.01) 9.2 dmac related registers dma0?4 interrupt request status register (dm04itst) b bit name function r w 0?2 no function assigned. fix to "0". 00 3 dmitst4 (dma4 interrupt request s tatus bit) 0: interrupt not requested r(note 1) 4 dmitst3 (dma3 interrupt requ est status bit) 1: interrupt requested 5 dmitst2 (dma2 interrupt request status bit) 6 dmitst1 (dma1 interrupt request status bit) 7 dmitst0 (dma0 interrupt request status bit) note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. dma5?9 interrupt request status register (dm59itst) b bit name function r w 0?2 no function assigned. fix to "0". 00 3 dmitst9 (dma9 interrupt request status bit) 0: interrupt not requested r(note 1) 4 dmitst8 (dma8 interrupt request status bit) 1: interrupt requested 5 dmitst7 (dma7 interrupt request status bit) 6 dmitst6 (dma6 interrupt request status bit) 7 dmitst5 (dma5 interrupt request status bit) note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. the interrupt request status register helps to know the status of interrupt requests on each channel. if the dman interrupt request status bit (n = 0?9) is set to "1", it means that a dma interrupt request on the corresponding channel has been generated. (1) dmitstn (dman interrupt request status) bit (n = 0?9) [setting the dman interrupt request status bit] this bit is set in hardware, and cannot be set in software. [clearing the dman interrupt request status bit] this bit is cleared by writing "0" in software. note: ? the dman interrupt request status bit cannot be cleared by writing "0" to the dma interrupt control register?s ?interrupt request bit? included in the interrupt controller. when writing to the dma interrupt request status register, make sure only the bits to be cleared are set to "0" and all other bits are set to "1". those bits that have been set to "1" are unaffected by writing in software and retain the value they had before the write. b0123456b7 dmitst9 dmitst8 dmitst7 dmitst6 dmitst5 00000000 b0123456b7 dmitst4 dmitst3 dmitst2 dmitst1 dmitst0 00000000
9 dmac 9-19 32176 group user?s manual (rev.1.01) 9.2 dmac related registers dma0?4 interrupt request mask register (dm04itmk) b bit name function r w 8?10 no function assigned. fix to "0". 00 11 dmitmk4 (dma4 interrupt request mask bit) 0: enable interrupt request r w 12 dmitmk3 (dma3 interrupt request mask bit) 1: mask (disable) interrupt request 13 dmitmk2 (dma2 interrupt request mask bit) 14 dmitmk1 (dma1 interrupt request mask bit) 15 dmitmk0 (dma0 interrupt request mask bit) dma5?9 interrupt request mask register (dm59itmk) b bit name function r w 8?10 no function assigned. fix to "0". 00 11 dmitmk9 (dma9 interrupt request mask bit) 0: enable interrupt request r w 12 dmitmk8 (dma8 interrupt request mask bit) 1: mask (disable) interrupt request 13 dmitmk7 (dma7 interrupt request mask bit) 14 dmitmk6 (dma6 interrupt request mask bit) 15 dmitmk5 (dma5 interrupt request mask bit) the dma interrupt request mask register is used to mask interrupt requests on each dma channel. (1) dmitmkn (dman interrupt request mask) bit (n = 0?9) setting the dman interrupt request mask bit to "1" masks the interrupt requests on dman channel. however, if an interrupt request occurs, the dman interrupt request status bit is always set to "1" irrespective of the contents of this mask register. b8 9 1011121314b15 dmitmk4 dmitmk3 dmitmk2 dmitmk1 dmitmk0 00000000 b8 9 1011121314b15 dmitmk9 dmitmk8 dmitmk7 dmitmk6 dmitmk5 00000000
9 9-20 dmac 32176 group user?s manual (rev.1.01) f/f f/f dmitmk0 dmitst0 f/f f/f dmitmk1 dmitst1 f/f f/f dmitmk2 dmitst2 f/f f/f dmitmk3 dmitst3 f/f f/f dmitmk4 dmitst4 b15 b7 b14 b6 b13 b5 b12 b4 b11 b3 data bus dma4udf dma3udf dma2udf dma1udf dma0udf dma transfer interrupt request 0 (level) 5-source inputs dm04itst (h'0080 0400) dm04itmk (h'0080 0401) figure 9.2.3 block diagram of dma transfer interrupt request 0 9.2 dmac related registers
9 dmac 9-21 32176 group user?s manual (rev.1.01) f/f f/f dmitmk5 dmitst5 f/f f/f dmitmk6 dmitst6 f/f f/f dmitmk7 dmitst7 f/f f/f dmitmk8 dmitst8 f/f f/f dmitmk9 dmitst9 b15 b7 b14 b6 b13 b5 b12 b4 b11 b3 data bus dma9udf dma8udf dma7udf dma6udf dma5udf dma transfer interrupt request 1 (level) 5-source inputs dm59itst (h'0080 0408) dm59itmk (h'0080 0409) figure 9.2.4 block diagram of dma transfer interrupt request 1 9.2 dmac related registers
9 9-22 dmac 32176 group user?s manual (rev.1.01) 9.3 functional description of the dmac 9.3.1 dma transfer request sources for each dma channel (channels 0?9), dma transfer can be requested from two or more sources. there are various causes or sources of dma transfer request, so that dma transfer can be started by a request from some internal peripheral i/o, started in software by a program, or can be started upon completion of one transfer or all transfers on another dma channel (cascade mode). the causes or sources of dma transfer requests are selected using the request source select bits reqsln on each channel (dman channel control register bits 2 and 3). the tables below list the causes or sources of dma transfer requests on each channel. table 9.3.1 dma transfer request sources and generation timings on dma0 reqsl0 dma transfer request source dma transfer request generation timing 0 0 software start or one dma2 when any data is written to the dma0 software request generation register transfer completed (software start) or when one dma2 transfer is completed (cascade mode) 0 1 a-d0 conversion completed when a-d0 conversion is completed 1 0 mjt (tio8_udf) when mjt tio8 underflows 1 1 mjt (input event bus 2) when mjt input event bus 2 signal is generated table 9.3.2 dma transfer request sources and generation timings on dma1 reqsl1 dma transfer request source dma transfer request generation timing 0 0 software start when any data is written to the dma1 software request generation register 0 1 mjt (output event bus 0) when mjt output event bus 0 signal is generated 1 0 settings inhibited ? 1 1 one dma0 transfer completed when one dma0 transfer is completed (cascade mode) table 9.3.3 dma transfer request sources and generation timings on dma2 reqsl2 dma transfer request source dma transfer request generation timing 0 0 software start when any data is written to the dma2 software request generation register 0 1 mjt (output event bus 1) when mjt output event bus 1 signal is generated 1 0 mjt (tin18 edge select output) when mjt tin18 input signal is generated (edge select output) 1 1 one dma1 transfer completed when one dma1 transfer is completed (cascade mode) 9.3 functional description of the dmac
9 dmac 9-23 32176 group user?s manual (rev.1.01) table 9.3.4 dma transfer request sources and generation timings on dma3 reqsl3 dma transfer request source dma transfer request generation timing 0 0 software start when any data is written to the dma3 software request generation register 0 1 serial i/o0 (transmit buffer empty) when serial i/o0 transmit buffer is empty 1 0 serial i/o1 (reception completed) when serial i/o1 reception is completed 1 1 mjt (tin0 edge select output) when mjt tin0 input signal is generated (edge select output) table 9.3.5 dma transfer request sources and generation timings on dma4 reqsl4 dma transfer request source dma transfer request generation timing 0 0 software start when any data is written to the dma4 software request generation register 0 1 one dma3 transfer completed when one dma3 transfer is completed (cascade mode) 1 0 serial i/o0 (reception completed) when serial i/o0 reception is completed 1 1 mjt (tin19 edge select output) when mjt tin19 input signal is generated (edge select output) table 9.3.6 dma transfer request sources and generation timings on dma5 reqsl5 dma transfer request source dma transfer request generation timing 0 0 software start or one dma7 when any data is written to the dma5 software request generation register transfer completed (software start) or when one dma7 transfer is completed (cascade mode) 0 1 all dma0 transfers completed when all dma0 transfers are completed (cascade mode) 1 0 serial i/o2 (reception completed) when serial i/o2 reception is completed 1 1 mjt (tin20 edge select output) when mjt tin20 input signal is generated (edge select output) table 9.3.7 dma transfer request sources and generation timings on dma6 reqsl6 dma transfer request source dma transfer request generation timing 0 0 software start when any data is written to the dma6 software request generation register 0 1 serial i/o1 (transmit buffer empty) when serial i/o1 transmit buffer is empty 1 0 can (can0_s0/s15) can0: when slot 0 transmission failed or slot 15 transmission/reception completed 1 1 one dma5 transfer completed when one dma5 transfer is completed (cascade mode) 9.3 functional description of the dmac
9 9-24 dmac 32176 group user?s manual (rev.1.01) 9.3 functional description of the dmac table 9.3.8 dma transfer request sources and generation timings on dma7 reqsl7 dma transfer request source dma transfer request generation timing 0 0 software start when any data is written to the dma7 software request generation register 0 1 serial i/o2 (transmit buffer empty) when serial i/o2 transmit buffer is empty 1 0 can (can0_s1/s14) can0: when slot 1 transmission failed or slot 14 transmission/reception completed 1 1 one dma6 transfer completed when one dma6 transfer is completed (cascade mode) table 9.3.9 dma transfer request sources and generation timings on dma8 reqsl8 dma transfer request source dma transfer request generation timing 0 0 software start when any data is written to the dma8 software request generation register 0 1 mjt (input event bus 0) when mjt input event bus 0 signal is generated 1 0 serial i/o3 (reception completed) when serial i/o3 reception is completed 1 1 can (can1_s0/s15) can1: when slot 0 transmission failed or slot 15 transmission/reception completed table 9.3.10 dma transfer request sources and generation timings on dma9 reqsl9 dma transfer request source dma transfer request generation timing 0 0 software start when any data is written to the dma9 software request generation register 0 1 serial i/o3 (transmit buffer empty) when serial i/o3 transmit buffer is empty 1 0 can (can1_s1/s14) can1: when slot 1 transmission failed or slot 14 transmission/reception completed 1 1 one dma8 transfer completed when one dma8 transfer is completed (cascade mode)
9 dmac 9-25 32176 group user?s manual (rev.1.01) dma transfer starts as requested by internal peripheral i/o dma transfer processing starts transfer count register underflows interrupt request generated set dma0 channel control register set dma0-4 interrupt request status register set dma0 channel control register set dma0 source address register set dma0 destination address register set dma0 count register setting dmac-related registers starting dma transfer dma transfer completed  transfers disabled  interrupt request status bits cleared set dma0-4 interrupt request mask register  source address of transfer  destination address of transfer  number of times dma transfer is performed  transfer mode, request source, transfer size, address direction and transfer enable dma operation completed  interrupt request enabled set the interrupt controller's dma0-4 interrupt control register  interrupt priority level setting interrupt controller-related registers figure 9.3.1 example of a dma transfer processing procedure 9.3.2 dma transfer processing procedure shown below is an example of how to control dma transfer in cases when performing transfer on dma channel 0. 9.3 functional description of the dmac
9 9-26 dmac 32176 group user?s manual (rev.1.01) figure 9.3.2 gaining and releasing control of the internal bus one dma transfer dmac cpu internal bus arbitration (requests from the dmac) internal bus r: read w: write rw rw rw requested gained requested gained requested gained one dma transfer one dma transfer released released released 9.3 functional description of the dmac 9.3.3 starting dma use the reqsl (dma request source select) bit to set the cause or source of dma transfer request. to enable dma, set the tenl (dma transfer enable) bit to "1". dma transfer begins when the specified cause or source of dma transfer request becomes effective after setting the tenl (dma transfer enable) bit to "1". note: ? if the transfer request source selected by the reqsl (dma transfer request source select) bit is mjt (tin input signal), the time required for dma transfer to begin after detecting the rising or falling or both edges of the tin input signal is three cycles (150 ns when the internal peripheral clock = 20 mhz) at the shortest. or, depending on the preceding or following bus usage condition, up to six cycles (300 ns when the internal peripheral clock = 20 mhz) may be required. (however, this applies when the external bus, hold and the lock instruction all are unused.) to ensure that changes of the tin input signal state will be detected correctly, make sure the tin input signal is held active for a duration of more than 7tc (bclk)/2. (for details, see section 21.8, ?ac characteristics (when vcce = 5 v),? and section 21.9, ?ac characteristics (when vcce = 3.3 v).?) 9.3.4 dma channel priority channel 0 has the highest priority. the priority of this and other channels is shown below. channel 0 > channel 1 > channel 2 > channel 3 > channel 4 > channel 5 > channel 6 > channel 7 > channel 8 > channel 9 this order of priority is fixed. channel priority is resolved every transfer cycle (i.e., every three dma buy cycles), and the channel with the highest priority among those that are requesting a dma transfer is selected. 9.3.5 gaining and releasing control of the internal bus for any channel, control of the internal bus is gained and released in ?single transfer dma? mode. in single transfer dma, the dmac gains control of the internal bus (in one peripheral clock cycle) when dma transfer request is accepted and after executing one dma transfer (in one read and one write peripheral clock cycle), returns bus control to the cpu. the diagram below shows the operation in single transfer dma.
9 dmac 9-27 32176 group user?s manual (rev.1.01) 9.3.6 transfer units use the tszsl (dma transfer size select) bit to set for each channel the number of bits (8 or 16 bits) to be transferred in one dma transfer. 9.3.7 transfer counts use the dma transfer count register to set transfer counts for each channel. transfer can be performed up to 256 times. the value of the dma transfer count register is decremented by one every time one transfer unit is transferred. in ring buffer mode, the dma transfer count register operates in free-run mode, with the value set in it ignored. 9.3.8 address space the address space in which data can be transferred by dma is 64 kbytes of internal peripheral i/o or ram space (h?0080 0000 through h?0080 ffff) for both source and destination. to set the source and destination addresses on each dma channel, use the dma source address register and dma destination address register. 9.3.9 transfer operation (1) dual-address transfer irrespective of the size of transfer unit, data is transferred in two bus cycles, one for source read access and one for destination write access. (the transfer data is taken into the dmac?s internal temporary register before being transferred.) (2) bus protocol and bus timing because the bus interface is shared with the cpu, dma transfer is performed with the same bus protocol and the same bus timing as when peripheral modules are accessed by the cpu. (3) transfer rate transfer is performed using a total of three peripheral clock cycles, one cycle to gain control of the bus and one read and one write cycle to perform one transfer. therefore, the maximum transfer rate is calculated by the equation below: maximum transfer rate [bytes per second] = 2 bytes 9.3 functional description of the dmac
9 9-28 dmac 32176 group user?s manual (rev.1.01) figure 9.3.3 transfer byte positions 9.3 functional description of the dmac (4) address count direction and address changes the direction in which the source and destination addresses are counted as transfer proceeds (?address fixed? or ?address incremental?) is set for each channel using the sadsl (source address direction select) and dadsl (destination address direction select) bits. when the transfer size is 16 bits, the address is incremented by two for each dma transfer performed; when the transfer size is 8 bits, the address is incremented by one. table 9.3.11 address count direction and address changes address count direction transfer unit address change for one dma address fixed 8 bits 0 16 bits 0 address incremental 8 bits +1 16 bits +2 (5) transfer count value the transfer count value is decremented one at a time, irrespective of the size of transfer unit (8 or 16 bits). (6) transfer byte positions when the transfer unit is 8 bits, the lsb of the address register is effective for both source and destination. (therefore, in addition to data transfers between even addresses or between odd addresses, data may be transferred from even address to odd address or vice versa.) when the transfer unit is 16 bits, the lsb of the address register (= bit 15) is ignored, and data are always transferred in two bytes aligned to the 16-bit bus. the diagram below shows the valid byte positions in dma transfer. b0 b7 b8 b15 8 bits +0 +1 source destination 8 bits 8 bits 8 bits 16 bits 16 bits b0 b7 b8 b15 +0 +1
9 dmac 9-29 32176 group user?s manual (rev.1.01) 9.3 functional description of the dmac figure 9.3.4 example of how addresses are incremented in 32-channel ring buffer mode transfer count transfer address 1 h'0080 1000 2 h'0080 1001 3 h'0080 1002 31 h'0080 101e 32 h'0080 101f 1 h'0080 1000 2 h'0080 1001 transfer count transfer address 1 h'0080 1000 2 h'0080 1002 3 h'0080 1004 31 h'0080 103c 32 h'0080 103e 1 h'0080 1000 2 h'0080 1002 | | | | | | | | (7) ring buffer mode when ring buffer mode is selected, transfer begins from the transfer start address and after performing transfers 32 times, control returns to the transfer start address, from which transfer operation is repeated. in this case, however, the five low-order bits of the ring buffer start address must always be b?00000 (if transfer size = 16 bits, the six low-order bits must be b?000000). the following describes how addresses are incremented in ring buffer mode. [1] when the transfer size is 8 bits the 27 high-order bits of the transfer start address are fixed, and the five low-order bits are incremented by one at a time. when as transfer proceeds the five low-order bits reach b?11111, they are recycled to b?00000 by the next increment operation, thus returning to the start address again. [2] when the transfer size is 16 bits the 26 high-order bits of the transfer start address are fixed, and the six low-order bits are incremented by two at a time. when as transfer proceeds the six low-order bits reach b?111110, they are recycled to b?000000 by the next increment operation, thus returning to the start address again. if the source address has been set to be incremented, it is the source address that recycles to the start address; if the destination address has been set to be incremented, it is the destination address that recycles to the start address. if both source and destination addresses have been set to be incremented, both ad- dresses recycle to the start address. however, the start address on either side must have their five low-order bits initially set to b?00000 (if transfer size = 16 bits, the six low-order bits must be b?000000). during ring buffer mode, the transfer count register is ignored. once dma operation starts, the counter operates in free-run mode, and the transfer continues until the transfer enable bit is cleared to "0" (to disable transfer).
9 9-30 dmac 32176 group user?s manual (rev.1.01) 9.3.10 end of dma and interrupt in normal mode, dma transfer is terminated by an underflow of the transfer count register. when transfer finishes, the transfer enable bit is cleared to "0" and transfers are thereby disabled. also, an interrupt request is generated at completion of transfer. however, if interrupt requests on any channel have been masked by the dma interrupt request mask register, no interrupt requests are generated on that channel. during ring buffer mode, the transfer count register operates in free-run mode, and transfer continues until the transfer enable bit is cleared to "0" (to disable transfer). in this case, therefore, no interrupt requests are gener- ated at completion of dma transfer. nor are these dma transfer-completed interrupt requests are generated even when transfer in ring buffer mode is terminated by clearing the transfer enable bit. 9.3.11 each register status after completion of dma transfer when dma transfer is completed, the status of the source and destination address registers becomes as fol- lows: (1) address fixed ? the values set in the address registers before dma transfer started remain intact (fixed). (2) address incremental ? for 8-bit transfer, the values of the address registers are the last transfer address + 1. ? for 16-bit transfer, the values of the address registers are the last transfer address + 2. the transfer count register at completion of dma transfer is in an underflow state (h?ff). therefore, before another dma transfer can be performed, the transfer count register must be set newly again, except when trying to perform transfers 256 times (h?ff). 9.3 functional description of the dmac
9 dmac 9-31 32176 group user?s manual (rev.1.01) 9.4 precautions about the dmac ? about writing to the dmac related registers because dma transfer involves exchanging data via the internal bus, the dmac related registers basically can only be accessed for write immediately after reset or when transfer is disabled (transfer enable bit = "0"). when transfer is enabled, do not write to the dmac related registers, except the dma transfer enable bit, the transfer request flag and the dma transfer count register that is protected in hardware. this is a precaution necessary to ensure stable dma operation. the table below lists the registers that can or cannot be accessed for write. table 9.4.1 dmac related registers that can or cannot be accessed for write status transfer enable bit transfer request flag other dmac related registers transfer enabled can be accessed can be accessed cannot be accessed transfer disabled can be accessed can be accessed can be accessed even for registers that can exceptionally be written to while transfer is enabled, the following conditions must be observed: (1) dma channel control register 0 transfer enable bit and transfer request flag for all other bits in this register, be sure to write the same data that those bits had before the write. note, however, that only writing "0" is effective for the transfer request flag. (2) dma transfer count register when transfer is enabled, this register is protected in hardware, so that any data rewritten to it is ignored. (3) rewriting the dma source and dma destination addresses on different channels by dma transfer although this operation means accessing the dmac related registers while dma is enabled, there is no problem. note, however, that no data can be transferred by dma to the dmac related registers on the currently active channel itself. ? manipulating the dmac related registers by dma transfer when manipulating the dmac related registers by means of dma transfer (e.g., reloading the dmac related registers with the initial values by dma transfer), do not write to the dmac related registers on the currently active channel through that channel. (if this precaution is neglected, device operation cannot be guaranteed.) it is only the dmac related registers on other channels that can be rewritten by means of dma transfer. (for example, the dman source address and dman destination address registers on channel 1 can be rewritten by dma transfer through channel 0.) ? about the dma interrupt request status register when clearing the dma interrupt request status register, be sure to write "1" to all bits, except those to be cleared. writing "1" to any bits in this register has no effect, so that they retain the data they had before the write. ? about the stable operation of dma transfer to ensure the stable operation of dma transfer, never rewrite the dmac related registers, except the channel control register?s transfer enable bit, unless transfer is disabled. one exception is that even when transfer is enabled, the dma source address and dma destination address registers can be rewritten by dma transfer from one channel to another. 9.4 precautions about the dmac
9 9-32 dmac 32176 group user?s manual (rev.1.01) this page is blank for reasons of layout. 9.4 precautions about the dmac
chapter 10 multijunction timers 10.1 outline of multijunction timers 10.2 common units of multijunction timers 10.3 top (output-related 16-bit timer) 10.4 tio (input/output-related 16-bit timer) 10.5 tms (input-related 16-bit timer) 10.6 tml (input-related 32-bit timer)
10 10-2 multijunction timers 10.1 outline of multijunction timers 32176 group user?s manual (rev.1.01) 10.1 outline of multijunction timers the multijunction timers (abbreviated mjt) have input event and output event buses. therefore, in addition to being used as a single unit, the timers can be internally connected to each other. this capability allows for highly flexible timer configuration, making it possible to meet various application needs. it is because the timers are connected to the internal event buses at multiple points that they are called the ?multijunction? timers. the 32176 has four types of mjt as listed in the table below, providing a total of 37-channel timers. table 10.1.1 outline of mjt name type no. of channels description top output-related 11 one of three output modes can be selected by software. (timer 16-bit timer output) (down-counter) ? single-shot output mode ? delayed single-shot output mode ? continuous output mode tio input/output-related 10 one of three input modes or four output modes can be selected (timer 16-bit timer by software. input (down-counter) output) ? measure clear input mode ? measure free-run input mode ? noise processing input mode ? pwm output mode ? single-shot output mode ? delayed single-shot output mode ? continuous output mode tms input-related 8 16-bit input measure timer (timer 16-bit timer measure (up-counter) small) tml input-related 8 32-bit input measure timer (timer 32-bit timer measure (up-counter) large)
10 10-3 multijunction timers 10.1 outline of multijunction timers 32176 group user?s manual (rev.1.01) table 10.1.2 interrupt generation functions of mjt signal name mjt interrupt request source source of interrupt request no. of icu input sources irq12 tin3 input mjt input interrupt 4 1 irq11 tin20?tin23 input mjt input interrupt 3 4 irq10 tin16?tin19 input mjt input interrupt 2 4 irq9 tin0 input mjt input interrupt 1 1 irq7 tms0, tms1 output mjt output interrupt 7 2 irq6 top8, top9 output mjt output interrupt 6 2 irq5 top10 output mjt output interrupt 5 1 irq4 tio4?7 output mjt output interrupt 4 4 irq3 tio8, tio9 output mjt output interrupt 3 2 irq2 top0?5 output mjt output interrupt 2 6 irq1 top6, top7 output mjt output interrupt 1 2 irq0 tio0?3 output mjt output interrupt 0 4 table 10.1.3 dma transfer request generation by mjt signal name dma transfer request source dmac input channel drq0 tio8 underflow channel 0 drq1 input event bus 2 channel 0 drq2 output event bus 0 channel 1 drq4 output event bus 1 channel 2 drq5 tin18 input channel 2 drq6 tin19 input channel 4 drq7 tin0 input channel 3 drq12 tin20 input channel 5 drq13 input event bus 0 channel 8 table 10.1.4 a-d conversion start request by mjt signal name a-d conversion start request source a-d converter ad0trg input event bus 2, can be input to a-d0 conversion start trigger input event bus 3, output event bus 3, tin23
10 10-4 multijunction timers 10.1 outline of multijunction timers 32176 group user?s manual (rev.1.01) figure 10.1.1 block diagram of mjt (1/3) irq2 irq12 clk en udf top 0 clk en udf top 1 clk en udf top 2 clk en udf top 3 tclk0s to 0 (p110) irq9 3 2 1 0 bclk/2 clk en udf top 4 clk en udf top 5 tclk0 (p124) tin0 (p150) tclk1 (p125) s s tin0s clk en udf top 6 clk en udf top 7 s s s s s clk en udf top 8 clk en udf top 9 clk en udf top 10 clk en/cap udf tio 0 clk en/cap udf tio 1 clk en/cap udf tio 2 clk en/cap udf tio 3 clk en/cap udf tio 4 s s tin3 (p153) s s s s prs1 prs0 clk en/cap udf tio 5 s s tclk2 (p126) clk en/cap udf tio 6 s s clk en/cap udf tio 7 s s s s clk en/cap udf tio 8 clk en/cap udf tio 9 s s f/f0 f/f1 f/f2 f/f3 f/f4 f/f5 f/f6 f/f7 f/f8 f/f9 f/f10 f/f11 f/f12 f/f13 f/f14 f/f15 f/f16 f/f17 f/f18 f/f19 f/f20 s : selector f/f : output flip-flop prs0 - 2 : prescalers s s s s s s s s s s s s s s s irq2 irq2 irq2 irq2 irq2 to 1 (p111) to 2 (p112) to 3 (p113) to 4 (p114) to 5 (p115) to 6 (p116) to 7 (p117) to 8 (p100) to 9 (p101) to 10 (p102) to 11 (p103) to 12 (p104) to 13 (p105) to 14 (p106) to 15 (p107) irq1 irq1 irq6 irq6 irq5 irq0 irq0 irq0 irq0 irq4 to 16 (p93) to 17 (p94) to 18 (p95) to 19 (p96) to 20 (p97) irq4 drq0 irq3 irq3 3 2 1 0 0 1 2 3 3 2 1 0 3 2 1 0 prs2 irq4 irq4 0 1 2 3 tin3s tclk1s tclk2s drq7 clock bus input event bus output event bus note 1: indicates edge select output at the timer input pin. (see figure 10.1.3) note 2: indicates an input signal from peripheral circuits (ad, sio and can). (see figure 10.1.3) notes: ? irq0-7 and irq9-12 denote interrupt signals, of which the same number represents the same group of interrupts. (see table 10.1.2)  drq0-2, drq4-7, drq12 and drq13 common denote dma request signals to the dmac.(see table 10.1.3)  ad0trg denotes trigger signal to the a-d0 converter. (see table 10.1.4)
10 10-5 multijunction timers 10.1 outline of multijunction timers 32176 group user?s manual (rev.1.01) 3 2 1 0 3 2 1 0 clk tms 0 ovf cap3 cap2 cap1 cap0 s clk tml 0 cap3 cap2 cap1 cap0 s s s s tin20 (p134) tin21 (p135) tin22 (p136) tin23 (p137) irq11 irq11 irq11 irq11 bclk/2 0 1 2 3 irq7 3 2 1 0 3 2 1 0 0 1 2 3 tin20s tin21s tin22s tin23s s drq12 clk tms 1 ovf cap3 cap2 cap1 cap0 s s s s s drq5 tin16 (p130) tin17 (p131) tin18 (p132) tin19 (p133) drq6 irq10 irq10 irq10 irq10 irq7 tin16s tin17s tin18s tin19s clk tml 1 cap3 cap2 cap1 cap0 s tclk3 (p127) tclk3s s s s s s s s s ad0trg (to a-d0 converter) ad0trg (to a-d0 converter) ad0trg (to a-d0 converter) ad0trg (to a-d0 converter ) bclk/2 clock bus input event bus output event bus figure 10.1.2 block diagram of mjt (2/3)
10 10-6 multijunction timers 10.1 outline of multijunction timers 32176 group user?s manual (rev.1.01) figure 10.1.3 block diagram of mjt (3/3) clock bus input event bus 3 2 1 0 3 2 1 0 output event bus 0 1 2 3 3 2 1 0 3 2 1 0 0 1 2 3 ad0 conversion completed tio8-udf s dma0 udf end dmairq0 s dma1 udf end dmairq0 s dma2 udf end dmairq0 tin18s (note 1) s dma3 udf end dmairq0 s dma4 udf dmairq0 tin19s (note 1) sio0-txd sio1-rxd sio0-rxd s dma5 udf end dmairq1 s dma6 udf dmairq1 sio2-rxd sio1-txd end s dma7 udf end dmairq1 dmairq1 sio2-txd end s dma9 udf dmairq1 tin20s (note 1) tin0s (note 1) dma8 udf s sio3-txd sio3-rxd can0-s0/s15 can1-s0/s15 can1-s1/s14 can0-s1/s14 (note 2) (note 2) (note 2) (note 2) (note 2) (note 2) (note 2) (note 2) (note 2) (note 2) (note 2) (note 2)
10 10-7 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) 10.2 common units of multijunction timers the common units of mjt include the following: ? prescaler unit ? clock bus and input/output event bus control unit ? input processing control unit ? output flip-flop control unit ? interrupt control unit
10 10-8 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) 10.2.1 mjt common unit register map the table below shows a common unit register map of mjt. mjt common unit register map address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0200 (use inhibited area) clock bus & input event bus control register 10-13 (ckiebcr) h'0080 0202 prescaler register 0 prescaler register 1 10-9 (prs0) (prs1) h'0080 0204 prescaler register 2 output event bus control register 10-9 (prs2) (oebcr) 10-14 (use inhibited area) h'0080 0210 tclk input processing control register 10-17 (tclkcr) h'0080 0212 tin input processing control register 0 10-18 (tincr0) h'0080 0214 (use inhibited area) h'0080 0216 (use inhibited area) h'0080 0218 tin input processing control register 3 10-19 (tincr3) h'0080 021a tin input processing control register 4 10-19 (tincr4) h'0080 021c (use inhibited area) h'0080 021e (use inhibited area) h'0080 0220 f/f source select register 0 10-21 (ffs0) h'0080 0222 (use inhibited area) f/f source select register 1 10-22 (ffs1) h'0080 0224 f/f protect register 0 10-23 (ffp0) h'0080 0226 f/f data register 0 10-24 (ffd0) h'0080 0228 (use inhibited area) f/f protect register 1 10-23 (ffp1) h'0080 022a (use inhibited area) f/f data register 1 10-24 (ffd1) (use inhibited area) h'0080 0230 top interrupt control register 0 top interrupt control register 1 10-29 (topir0) (topir1) h'0080 0232 top interrupt control register 2 top interrupt control register 3 10-31 (topir2) (topir3) 10-32 h'0080 0234 tio interrupt control register 0 tio interrupt control register 1 10-33 (tioir0) (tioir1) 10-34 h'0080 0236 tio interrupt control register 2 tms interrupt control register 10-35 (tioir2) (tmsir) 10-36 h'0080 0238 tin interrupt control register 0 tin interrupt control register 1 10-37 (tinir0) (tinir1) 10-38 h'0080 023a (use inhibited area) h'0080 023c tin interrupt control register 4 tin interrupt control register 5 10-39 (tinir4) (tinir5) h'0080 023e tin interrupt control register 6 (use inhibited area) 10-41 (tinir6) | |
10 10-9 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) 10.2.2 prescaler unit the prescalers prs0?2 are an 8-bit counter, which generates clocks supplied to each timer (top, tio, tms and tml) from the internal peripheral clock (bclk) divided by 2 (10 mhz when f(bclk) = 20 mhz). the values of prescaler registers are initialized to h?00 upon exiting the reset state. when the set value of any prescaler register is rewritten, the prescaler starts operating with the new value at the same time it has underflowed. values h?00 to h?ff can be set in the prescaler register. the prescaler?s divide-by ratio is given by the equation below: prescaler divide-by ratio = 1 prescaler set value + 1 prescaler register 0 (prs0) prescaler register 1 (prs1) prescaler register 2 (prs2) b bit name function r w 0?7 prs0, prs2 set the prescaler divide-by value r w (8?15) prs1 prescaler prescaler registers 0?2 start counting after exiting the reset state. if the prescaler register is accessed for read during operation, the value written into it, not the current count, is read out. b0123456b7 (b8 9 10 11 12 13 14 b15) prs0-prs2 00000000
10 10-10 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) 10.2.3 clock bus and input/output event bus control unit (1) clock bus the clock bus is provided for supplying clock to each timer, and is comprised of four lines of clock bus 0?3. each timer can use these clock bus signals as clock input signals. the table below lists the signals that can be fed into the clock bus. table 10.2.1 acceptable clock bus signals clock bus acceptable signal 3 tclk0 input 2 internal prescaler (prs2) or tclk3 input 1 internal prescaler (prs1) 0 internal prescaler (prs0) (2) input event bus the input event bus is provided for supplying a count enable signal or measure capture signal to each timer, and is comprised of four lines of input event bus 0?3. each timer can use these input event bus signals as enable (or capture) input. furthermore, they can also be used as request signals to start a-d conversion or dma transfer. the table below lists the signals that can be fed into the input event bus. table 10.2.2 connectable (acceptable) input event bus signals input event bus connectable (acceptable) signal (note 1) 3 tin3 input, output event bus 2 or tio7 underflow signal 2 tin0 input 1 tio6 underflow signal 0 tio5 underflow signal note 1: for the destination (output) to which the input event bus signals are connected, see figure 10.1.1, ?block diagram of m jt.? (3) output event bus the output event bus has the underflow signal from each timer connected to it, and is comprised of four lines of output event bus 0?3. output event bus signals are connected to output flip-flops, and output event buses 3, 0 and 1 can be connected to the a-d0 converter, dma channel 1 and dma channel 2, respectively. furthermore, output event bus 2 can be connected to input event bus 3. the table below lists the signals that can be connected to the output event bus. table 10.2.3 connectable (acceptable) output event bus signals input event bus connectable (acceptable) signal (note 1) 3 top8, tio3, tio4 or tio8 underflow signal 2 top9 or tio2 underflow signal 1 top7 or tio1 underflow signal 0 top6 or tio0 underflow signal note 1: for the destination (output) to which the output event bus signals are connected, see figure 10.1.1, ?block diagram of mjt.? note that the signals from each timer to the output event bus (and tio5, 6 signals to the input event bus) are generated with the timing shown in table 10.2.4, and not the timing at which signals are output from the timer to the output flip-flop.
10 10-11 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) table 10.2.4 timing at which signals are generated to the output event bus by each timer timer mode timing at which signals are generated to the output event bus top single-shot output mode when the counter underflows delayed single-shot output mode when the counter underflows continuous output mode when the counter underflows tio(note 1) measure clear input mode when the counter underflows measure free-run input mode when the counter underflows noise processing input mode when the counter underflows pwm output mode when the counter underflows single-shot output mode when the counter underflows delayed single-shot output mode when the counter underflows continuous output mode when the counter underflows tms (16-bit measure input) no signals generated tml (32-bit measure input) no signals generated note 1: tio5,6 output an underflow signal to the input event bus.
10 10-12 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) figure 10.2.1 conceptual diagram of the clock bus and input/output event bus clock bus input event bus tclk0s 3 2 1 0 bclk/2 tclk0 (p124) tin0 (p150) tin3 (p153) prs1 prs0 prs0 - 2 : prescaler 3 2 1 0 3 2 1 0 3 2 1 0 prs2 tclk3 (p127) udf tio 5 udf tio 6 s output event bus 0 1 2 3 udf tio 7 clk en udf top 6 clk en udf top 7 clk en udf top 8 clk en udf top 9 udf tio 0 udf tio 1 udf tio 2 udf tio 3 udf tio 4 udf tio 8 0 1 2 3 s : selector tclk3s tin0s tin3s
10 10-13 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) the clock bus and input/output event bus control unit has the following registers: ? clock bus & input event bus control register (ckiebcr) ? output event bus control register (oebcr) clock bus & input event bus control register (ckiebcr) b bit name function r w 8, 9 ieb3s 0x: select external input 3 (tin3) r w input event bus 3 input select bit 10: select output event bus 2 11: select tio7 output 10, 11 ieb2s 00: select external input 0 (tin0) r w input event bus 2 input select bit 01: does not use input event bus 2 10: does not use input event bus 2 11: does not use input event bus 2 12 ieb1s 0: does not use input event bus 1 r w input event bus 1 input select bit 1: select tio6 output 13 ieb0s 0: does not use input event bus 0 r w input event bus 0 input select bit 1: select tio5 output 14 no function assigned. fix to "0". 00 15 ckb2s 0: select prescaler 2 r w clock bus 2 input select bit 1: select external clock 3 (tclk3) the ckiebcr register is used to select the clock source (external input or prescaler) supplied to the clock bus and the count enable/capture signal (external input or output event bus) supplied to the input event bus. b89 1011121314b15 ieb3s ieb2s ieb1s ieb0s ckb2s 00000000
10 10-14 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) output event bus control register (oebcr) b bit name function r w 8, 9 oeb3s 00: select top8 output r w output event bus 3 input select bit 01: select tio3 output 10: select tio4 output 11: select tio8 output 10 no function assigned. fix to "0". 00 11 oeb2s 0: select top9 output r w output event bus 2 input select bit 1: select tio2 output 12 no function assigned. fix to "0". 00 13 oeb1s 0: select top7 output r w output event bus 1 input select bit 1: select tio1 output 14 no function assigned. fix to "0". 00 15 oeb0s 0: select top6 output r w output event bus 0 input select bit 1: select tio0 output the oebcr register is used to select the timer (top or tio) whose underflow signal is supplied to the output event bus. 10.2.4 input processing control unit the input processing control unit processes tclk and tin input signals to the mjt. in tclk input processing, it selects the source of tclk signal, and for external input, it selects the active edge (rising or falling or both) or level (high or low) of the signal, at which to generate the clock signal supplied to the clock bus. in tin input processing, the unit selects the active edge (rising or falling or both) or level (high or low) of the signal, at which to generate the enable, measure or count source signal for each timer or the signal supplied to each event bus. following input processing registers are included: ? tlck input processing control register (tclkcr) ? tin input processing control register 0 (tincr0) ? tin input processing control register 3 (tincr3) ? tin input processing control register 4 (tincr4) b8 9 1011121314b15 oeb3s oeb2s oeb1s oeb0s 00000000
10 10-15 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) count clock count clock count clock bclk/2 count clock bclk/2 tclk tclk count clock tclk tclk tclk count clock bclk/2 item function bclk/2 rising edge falling edge both edges low level high level (1) functions of tclk input processing control registers
10 10-16 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) (2) functions of tin input processing control registers internal edge signal internal edge signal internal edge signal prescaler output period or tclk input period tin tin internal edge signal tin tin tin internal edge signal prescaler output period or tclk input period item function rising edge falling edge both edges low level high level
10 10-17 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tlck input processing control register (tclkcr) b bit name function r w 0, 1 no function assigned. fix to "0". 00 2, 3 tclk3s 00: bclk/2 r w tclk3 input processing select bit 01: rising edge 10: falling edge 11: both edges 4 no function assigned. fix to "0". 00 5?7 tclk2s 000: disable input r w tclk2 input processing select bit 001: rising edge 010: falling edge 011: both edges 100: low level 101: low level 110: high level 111: high level 8 no function assigned. fix to "0". 00 9?11 tclk1s 000: disable input r w tclk1 input processing select bit 001: rising edge 010: falling edge 011: both edges 100: low level 101: low level 110: high level 111: high level 12,13 no function assigned. fix to "0". 00 14,15 tclk0s 00: bclk/2 r w tclk0 input processing select bit 01: rising edge 10: falling edge 11: both edges note: ? this register must always be accessed in halfwords. b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 tclk3s tclk2s tclk1s tclk0s 0 000000000000000
10 10-18 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tin input processing control register 0 (tincr0) b bit name function r w 0 no function assigned. fix to "0". 00 1?3 tin4s fix to "0". 0 0 reserved bit 4 no function assigned. fix to "0". 00 5?7 tin3s 000: disable input r w tin3 input processing select bit 001: rising edge 010: falling edge 011: both edges 100: low level 101: low level 110: high level 111: high level 8, 9 no function assigned. fix to "0". 00 10,11 tin2s fix to "0". 0 0 reserved bit 12,13 tin1s fix to "0". 0 0 reserved bit 14,15 tin0s 00: disable input r w tin0 input processing select bit 01: rising edge 10: falling edge 11: both edges note: ? this register must always be accessed in halfwords. b01234567891011121314b15 tin4s tin3s tin2s tin1s tin0s 0000000000000000
10 10-19 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tin input processing control register 3 (tincr3) b bit name function r w 0, 1 tin19s (tin19 input processing select bit) 00: disable input r w 2, 3 tin18s (tin18 input processing select bit) 01: rising edge 4, 5 tin17s (tin17 input processing select bit) 10: falling edge 6, 7 tin16s (tin16 input processing select bit) 11: both edges 8, 9 tin15s (reserved bit) fix to "0". 0 0 10, 11 tin14s (reserved bit) 12, 13 tin13s (reserved bit) 14, 15 tin12s (reserved bit) note: ? this register must always be accessed in halfwords. tin input processing control register 4 (tincr4) b bit name function r w 0, 1 tin33s (reserved bit) fix to "0". 0 0 2, 3 tin32s (reserved bit) 4, 5 tin31s (reserved bit) 6, 7 tin30s (reserved bit) 8, 9 tin23s (tin23 input processing select bit) 00: disable input r w 10, 11 tin22s (tin22 input processing select bit) 01: rising edge 12, 13 tin21s (tin21 input processing select bit) 10: fa lling edge 14, 15 tin20s (tin20 input processing select bit) 11: both edges note: ? this register must always be accessed in halfwords. b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 tin19s tin18s tin17s tin16s tin15s tin14s tin13s tin12s 0 000000000000000 b01234567891011121314b15 tin33s tin32s tin31s tin30s tin23s tin22s tin21s tin20s 0 000000000000000
10 10-20 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) 10.2.5 output flip-flop control unit the output flip-flop control unit controls the flip-flops (f/f) provided for each timer. following flip-flop control registers are included: ? f/f source select register 0 (ffs0) ? f/f source select register 1 (ffs1) ? f/f protect register 0 (ffp0) ? f/f protect register 1 (ffp1) ? f/f data register 0 (ffd0) ? f/f data register 1 (ffd1) the timing at which signals are generated to the output flip-flop by each timer are shown in table 10.2.5. (note that this timing is different from one at which signals are output from the timer to the output event bus.) 10.2.5 timing at which signals are generated to the output flip-flop by each timer timer mode timing at which signals are generated to the output flip-flop top single-shot output mode when counter is enabled or underflows delayed single-shot output mode when counter underflows continuous output mode when counter is enabled or underflows tio measure clear input mode when counter underflows measure free-run input mode when counter underflows noise processing input mode when counter underflows pwm output mode when counter is enabled or underflows single-shot output mode when counter is enabled or underflows delayed single-shot output mode when counter underflows continuous output mode when counter is enabled or underflows tms (16-bit measure input) no signals generated tml (32-bit measure input) no signals generated figure 10.2.2 configuration of the f/f output circuit table output event bus 0 data bus f/f protect (fpn) wr data bus output control (on/off) ton internal edge signal port operation mode register (pnmod) f/fn output data (fdn) top tio f/f source selection (ffn) output event bus 1 output event bus 2 output event bus 3 f/f f/f f/f udf
10 10-21 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) f/f source select register 0 (ffs0) b bit name function r w 0?2 no function assigned. fix to "0". 00 3 ff15 0: tio4 output r w f/f15 source select bit 1: output event bus 0 4 ff14 0: tio3 output r w f/f14 source select bit 1: output event bus 0 5 ff13 0: tio2 output r w f/f13 source select bit 1: output event bus 3 6 ff12 0: tio1 output r w f/f12 source select bit 1: output event bus 2 7 ff11 0: tio0 output r w f/f11 source select bit 1: output event bus 1 8, 9 ff10 00: top10 output r w f/f10 source select bit 01: top10 output 10: output event bus 0 11: output event bus 1 10, 11 ff9 00: top9 output r w f/f9 source select bit 01: top9 output 10: output event bus 0 11: output event bus 1 12, 13 ff8 00: top8 output r w f/f8 source select bit 01: output event bus 0 10: output event bus 1 11: output event bus 2 14 ff7 0: top7 output r w f/f7 source select bit 1: output event bus 0 15 ff6 0: top6 output r w f/f6 source select bit 1: output event bus 1 note: ? this register must always be accessed in halfwords. b01234567891011121314b15 ff15 ff14 ff13 ff12 ff11 ff10 ff9 ff8 ff7 ff6 0 000000000000000
10 10-22 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) f/f source select register 1 (ffs1) b bit name function r w 8, 9 ff19 00: tio8 output r w f/f19 source select bit 01: tio8 output 10: output event bus 0 11: output event bus 1 10, 11 ff18 00: tio7 output r w f/f18 source select bit 01: tio7 output 10: output event bus 0 11: output event bus 1 12, 13 ff17 00: tio6 output r w f/f17 source select bit 01: tio6 output 10: output event bus 0 11: output event bus 1 14, 15 ff16 00: tio5 output r w f/f16 source select bit 01: output event bus 0 10: output event bus 1 11: output event bus 3 these registers select the signal source for each output f/f (flip-flop). this signal source can be chosen to be a signal from the internal output bus or an underflow output from each timer. b8 9 1011121314b15 ff19 ff18 ff17 ff16 0 0000000
10 10-23 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) f/f protect register 0 (ffp0) b bit name function r w 0 fp15 (f/f15 protect bit) 0: enable write to f/f output bit r w 1 fp14 (f/f14 protect bit) 1: disable write to f/f output bit 2 fp13 (f/f13 protect bit) 3 fp12 (f/f12 protect bit) 4 fp11 (f/f11 protect bit) 5 fp10 (f/f10 protect bit) 6 fp9 (f/f9 protect bit) 7 fp8 (f/f8 protect bit) 8 fp7 (f/f7 protect bit) 9 fp6 (f/f6 protect bit) 10 fp5 (f/f5 protect bit) 11 fp4 (f/f4 protect bit) 12 fp3 (f/f3 protect bit) 13 fp2 (f/f2 protect bit) 14 fp1 (f/f1 protect bit) 15 fp0 (f/f0 protect bit) note: ? this register must always be accessed in halfwords. f/f protect register 1 (ffp1) b bit name function r w 8?10 no function assigned. fix to "0". 00 11 fp20 (f/f20 protect bit) 0: enable write to f/f output bit r w 12 fp19 (f/f19 protect bit) 1: disable write to f/f output bit 13 fp18 (f/f18 protect bit) 14 fp17 (f/f17 protect bit) 15 fp16 (f/f16 protect bit) these registers enable or disable write to each output f/f (flip-flop). if write to any output f/f is disabled, writing to the corresponding f/f data register has no effect. b01234567891011121314b15 fp15 fp14 fp13 fp12 fp11 fp10 fp9 fp8 fp7 fp6 fp5 fp4 fp3 fp2 fp1 fp0 0000000000000000 b8 9 1011121314b15 fp20 fp19 fp18 fp17 fp16 00000000
10 10-24 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) f/f data register 0 (ffd0) b bit name function r w 0 fd15 (f/f15 output data bit) 0: f/f output data = 0 r w 1 fd14 (f/f14 output data bit) 1: f/f output data = 1 2 fd13 (f/f13 output data bit) 3 fd12 (f/f12 output data bit) 4 fd11 (f/f11 output data bit) 5 fd10 (f/f10 output data bit) 6 fd9 (f/f9 output data bit) 7 fd8 (f/f8 output data bit) 8 fd7 (f/f7 output data bit) 9 fd6 (f/f6 output data bit) 10 fd5 (f/f5 output data bit) 11 fd4 (f/f4 output data bit) 12 fd3 (f/f3 output data bit) 13 fd2 (f/f2 output data bit) 14 fd1 (f/f1 output data bit) 15 fd0 (f/f0 output data bit) note: ? this register must always be accessed in halfwords. f/f data register 1 (ffd1) b bit name function r w 8?10 no function assigned. fix to "0". 00 11 fd20 (f/f20 output data bit) 0: f/f output data = 0 r w 12 fd19 (f/f19 output data bit) 1: f/f output data = 1 13 fd18 (f/f18 output data bit) 14 fd17 (f/f17 output data bit) 15 fd16 (f/f16 output data bit) these registers are used to set the data for each output f/f (flip-flop). although the f/f outputs normally change state depending on timer outputs, the f/f outputs can be set to 1 or cleared to 0 as necessary by writing to this register. the f/f data register can only be operated on when the f/f protect register described previously is enabled for write. b0 1234567891011121314b15 fd15 fd14 fd13 fd12 fd11 fd10 fd9 fd8 fd7 fd6 fd5 fd4 fd3 fd2 fd1 fd0 0000000000000000 b8 9 1011121314b15 fd20 fd19 fd18 fd17 fd16 00000000
10 10-25 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) 10.2.6 interrupt control unit the interrupt control unit controls the interrupt request signals output to the interrupt controller by each timer. following timer interrupt control registers are provided for each timer: ? top interrupt control register 0 (topir0) ? top interrupt control register 1 (topir1) ? top interrupt control register 2 (topir2) ? top interrupt control register 3 (topir3) ? tio interrupt control register 0 (tioir0) ? tio interrupt control register 1 (tioir1) ? tio interrupt control register 2 (tioir2) ? tms interrupt control register (tmsir) ? tin interrupt control register 0 (tinir0) ? tin interrupt control register 1 (tinir1) ? tin interrupt control register 4 (tinir4) ? tin interrupt control register 5 (tinir5) ? tin interrupt control register 6 (tinir6) for interrupts which have only one interrupt source in the interrupt vector table, no interrupt control registers are included in the timer, and the interrupt status flags are automatically managed within the interrupt controller. the relevant timer interrupt is the following. (for details, see chapter 5, ?interrupt controller.?) ? top10 mjt output interrupt 5 (irq5)
10 10-26 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) figure 10.2.3 interrupt request status and mask registers for interrupts which have two or more interrupt sources in the interrupt vector table, interrupt control registers are included, with which to control interrupt requests and determine interrupt input. therefore, the status flags in the interrupt controller only serve as a bit to determine interrupt requests from interrupt-enabled sources and cannot be accessed for write. (1) interrupt request status bit this status bit is used to determine whether there is an interrupt request. when an interrupt request occurs, this bit is set in hardware (cannot be set in software). the status bit is cleared by writing "0". writing "1" has no effect; the bit retains the status it had before the write. because this status bit is unaffected by the interrupt mask bit, it can be used to inspect the operating status of peripheral functions. in interrupt handling, make sure that within the grouped interrupt request status, only the status bit for the interrupt request that has been serviced is cleared. if the status bit for any interrupt request that has not been serviced is cleared, the pending interrupt request is cleared simultaneously with its status bit. (2) interrupt mask bit this bit is used to disable unnecessary interrupts within the grouped interrupt. set this bit to "0" to enable interrupts or "1" to disable interrupts. to the interrupt controller timer or tin input interrupt request interrupt request status data bus set group interrupt interrupt enabled clear f/f f/f data = 0
10 10-27 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) figure 10.2.4 example for clearing interrupt request status b4 5 b7 interrupt request status initial state event occurs on bit 6 interrupt request event occurs on bit 4 only bit 6 cleared bit 4 data retained b4 5 b7 1 1 0 1 write to the interrupt request status example for clearing interrupt request status 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 program example istreg = 0xfd; /* clear istat1 (0x02 bit) only */  to clear the interrupt request status register (istreg) interrupt request status 1, istat1 (0x02 bit) to clear an interrupt request status, always be sure to write "1" to all other interrupt request status bits. at this time, avoid using a logic operation like the one shown below. because it requires three step-istreg read, logic operation and write, if another interrupt request occurs between the read and write, status may be inadvertently cleared. b4 5 6 b7 interrupt request status event occurs on bit 6 event occurs on bit 4 only bit 6 cleared bit 4 also cleared 0 0 1 0 1 0 1 0 0 0 0 0 read 0 0 1 0 0 0 0 0 clear bit 6 (anding with 1101) write 6 6 istreg &= 0xfd; /* clear istat1 (0x02 bit) only */
10 10-28 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) the table below shows the relationship between the interrupt signals generated by multijunction timers and the interrupt sources input to the interrupt controller (icu). table 10.2.6 interrupt signals generated by mjt signal name generated by icu interrupt input source (note 1) no. of input sources irq0 tio0, tio1, tio2, tio3 mjt output interrupt 0 4 irq1 top6, top7 mjt output interrupt 1 2 irq2 top0, top1, top2, top3, top4, top5 mjt output interrupt 2 6 irq3 tio8, tio9 mjt output interrupt 3 2 irq4 tio4, tio5, tio6, tio7 mjt output interrupt 4 4 irq6 top8, top9 mjt output interrupt 6 2 irq7 tms0, tms1 mjt output interrupt 7 2 irq9 tin0 mjt input interrupt 1 1 irq10 tin16, tin17, tin18, tin19 mjt input interrupt 2 4 irq11 tin20, tin21, tin22, tin23 mjt input interrupt 3 4 irq12 tin3 mjt input interrupt 4 1 note 1: see chapter 5, ?interrupt controller (icu).? note: ? top10 has only one interrupt source in each interrupt group, so that their status and mask registers are nonexistent in the mjt interrupt control registers. (they are controlled directly by the interrupt controller.)
10 10-29 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) top interrupt control register 0 (topir0) b bit name function r w 0, 1 no function assigned. fix to "0". 00 2 topis5 (top5 interrupt request status bit) 0: interrupt not requested r(note 1) 3 topis4 (top4 interrupt request status bit) 1: interrupt requested 4 topis3 (top3 interrupt request status bit) 5 topis2 (top2 interrupt request status bit) 6 topis1 (top1 interrupt request status bit) 7 topis0 (top0 interrupt request status bit) note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. top interrupt control register 1 (topir1) b bit name function r w 8, 9 no function assigned. fix to "0". 00 10 topim5 (top5 interrupt request mask bit) 0: enable interrupt request r w 11 topim4 (top4 interrupt request mask bit) 1: mask (disable) interrupt request 12 topim3 (top3 interrupt request mask bit) 13 topim2 (top2 interrupt request mask bit) 14 topim1 (top1 interrupt request mask bit) 15 topim0 (top0 interrupt request mask bit) b0123456b7 topis5 topis4 topis3 topis2 topis1 topis0 00000000 b89 1011121314b15 topim5 topim4 topim3 topim2 topim1 topim0 00000000
10 10-30 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) figure 10.2.5 block diagram of mjt output interrupt 2 mjt output interrupt 2 irq2 data bus b2 topis5 f/f topim5 f/f b10 b3 topis4 f/f topim4 f/f b11 b4 topis3 f/f topim3 f/f b12 b5 topis2 f/f topim2 f/f b13 b6 topis1 f/f topim1 f/f b14 b7 topis0 f/f topim0 f/f b15 (level) 6-source inputs topir0 topir1 top5udf top4udf top3udf top2udf top1udf top0udf
10 10-31 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) top interrupt control register 2 (topir2) b bit name function r w 0, 1 no function assigned. fix to "0". 00 2 topis7 (top7 interrupt request status bit) 0: interrupt not requested r(note 1) 3 topis6 (top6 interrupt request status bit) 1: interrupt requested 4, 5 no function assigned. fix to "0". 00 6 topim7 (top7 interrupt request mask bit) 0: enable interrupt request r w 7 topim6 (top6 interrupt request mask bit) 1: mask (disable) interrupt request note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. mjt output interrupt 1 irq1 data bus b2 topis7 f/f topim7 f/f b6 b3 topis6 f/f topim6 f/f b7 (level) 2-source inputs topir2 top7udf top6udf figure 10.2.6 block diagram of mjt output interrupt 1 b0123456b7 topis7 topis6 topim7 topim6 00000000
10 10-32 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) top interrupt control register 3 (topir3) b bit name function r w 8,9 no function assigned. fix to "0". 00 10 topis9 (top9 interrupt request status bit) 0: interrupt not requested r(note 1) 11 topis8 (top8 interrupt request status bit) 1: interrupt requested 12,13 no function assigned. fix to "0". 00 14 topim9 (top9 interrupt request mask bit) 0: enable interrupt request r w 15 topim8 (top8 interrupt request mask bit) 1: mask (disable) interrupt request note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. note: ? top10 has only one interrupt source in the interrupt group, so that its status and mask registers are nonexistent in th e mjt interrupt control registers. (they are controlled directly by the interrupt controller.) b10 topis9 f/f topim9 f/f b14 b11 topis8 f/f topim8 f/f b15 mjt output interrupt 6 irq6 (level) 2-source inputs topir3 data bus top9udf top8udf figure 10.2.7 block diagram of mjt output interrupt 6 b8 9 1011121314b15 topis9 topis8 topim9 topim8 00000000
10 10-33 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tio interrupt control register 0 (tioir0) b bit name function r w 0 tiois3 (tio3 interrupt request status bit) 0: interrupt not requested r(note 1) 1 tiois2 (tio2 interrupt request status bit) 1: interrupt requested 2 tiois1 (tio1 interrupt request status bit) 3 tiois0 (tio0 interrupt request status bit) 4 tioim3 (tio3 interrupt request mask bit) 0: enable interrupt request r w 5 tioim2 (tio2 interrupt request mask bit) 1: mask (disable) interrupt request 6 tioim1 (tio1 interrupt request mask bit) 7 tioim0 (tio0 interrupt request mask bit) note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. mjt output interrupt 0 irq0 data bus b0 tiois3 f/f tioim3 f/f b4 b1 tiois2 f/f tioim2 f/f b5 b2 tiois1 f/f tioim1 f/f b6 b3 tiois0 f/f tioim0 f/f b7 (level) 4-source inputs tioir0 tio3udf tio2udf tio1udf tio0udf figure 10.2.8 block diagram of mjt output interrupt 0 b0123456b7 tiois3 tiois2 tiois1 tiois0 tioim3 tioim2 tioim1 tioim0 00000000
10 10-34 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tio interrupt control register 1 (tioir1) b bit name function r w 8 tiois7 (tio7 interrupt request status bit) 0: interrupt not requested r(note 1) 9 tiois6 (tio6 interrupt request status bit) 1: interrupt requested 10 tiois5 (tio5 interrupt request status bit) 11 tiois4 (tio4 interrupt request status bit) 12 tioim7 (tio7 interrupt request mask bit) 0: enable interrupt request r w 13 tioim6 (tio6 interrupt request mask bit) 1: mask (disable) interrupt request 14 tioim5 (tio5 interrupt request mask bit) 15 tioim4 (tio4 interrupt request mask bit) note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. mjt output interrupt 4 irq4 data bus b8 tiois7 f/f tioim7 f/f b12 b9 tiois6 f/f tioim6 f/f b13 b10 tiois5 f/f tioim5 f/f b14 b11 tiois4 f/f tioim4 f/f b15 (level) 4-source inputs tioir1 tio7udf tio6udf tio5udf tio4udf figure 10.2.9 block diagram of mjt output interrupt 4 b8 9 1011121314b15 tiois7 tiois6 tiois5 tiois4 tioim7 tioim6 tioim5 tioim4 00000000
10 10-35 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tio interrupt control register 2 (tioir2) b bit name function r w 0, 1 no function assigned. fix to "0". 00 2 tiois9 (tio9 interrupt request status bit) 0: interrupt not requested r(note 1) 3 tiois8 (tio8 interrupt request status bit) 1: interrupt requested 4, 5 no function assigned. fix to "0". 00 6 tioim9 (tio9 interrupt request mask bit) 0: enable interrupt request r w 7 tioim8 (tio8 interrupt request mask bit) 1: mask (disable) interrupt request note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. mjt output interrupt 3 irq3 data bus b2 tiois9 f/f tioim9 f/f b6 b3 tiois8 f/f tioim8 f/f b7 (level) 2-source inputs tioir2 tio9udf tio8udf figure 10.2.10 block diagram of mjt output interrupt 3 b0123456b7 tiois9 tiois8 tioim9 tioim8 00000000
10 10-36 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tms interrupt control register (tmsir) b bit name function r w 8, 9 no function assigned. fix to "0". 00 10 tmsis1 (tms1 interrupt request status bit) 0: interrupt not requested r(note 1) 11 tmsis0 (tms0 interrupt request status bit) 1: interrupt requested 12, 13 no function assigned. fix to "0". 00 14 tmsim1 (tms1 interrupt request mask bit) 0: enable interrupt request r w 15 tmsim0 (tms0 interrupt request mask bit) 1: mask (disable) interrupt request note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. mjt output interrupt 7 irq7 data bus b10 tmsis1 f/f tmsim1 f/f b14 b11 tmsis0 f/f tmsim0 f/f b15 (level) 2-source inputs tmsir tms1ovf tms0ovf figure 10.2.11 block diagram of mjt output interrupt 7 b8 9 1011121314b15 tmsis1 tmsis0 tmsim1 tmsim0 00000000
10 10-37 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tin interrupt control register 0 (tinir0) b bit name function r w 0-2 no function assigned. fix to "0". 00 3 tinis0 0: interrupt not requested r(note 1) tin0 interrupt request status bit 1: interrupt requested 4 no function assigned. fix to "0". 00 5 tinim2 fix to "0". 0 0 reserved bit 6 tinim1 reserved bit 7 tinim0 0: enable interrupt request r w tin0 interrupt request mask bit 1: mask (disable) interrupt request note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. figure 10.2.12 block diagram of mjt input interrupt 1 mjt input interrupt 1 irq9 data bus b3 tinis0 f/f tinim0 f/f b7 (level) tinir0 tin0edge b0123456b7 tinis0 tinim2 tinim1 tinim0 00000000
10 10-38 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tin interrupt control register 1 (tini r1) b bit name function r w 8-10 no function assigned. fix to "0". 00 11 tinis3 0: interrupt not requested r(note 1) tin3 interrupt request status bit 1: interrupt requested 12 tinim6 fix to "0". 0 0 reserved bit 13 tinim5 reserved bit 14 tinim4 reserved bit 15 tinim3 0: enable interrupt request r w tin3 interrupt request mask bit 1: mask (disable) interrupt request note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. figure 10.2.13 block diagram of mjt input interrupt 4 mjt input interrupt 4 irq12 data bus (level) tinir1 b11 tinis3 f/f tinim3 f/f b15 tin3edge b8 9 1011121314b15 tinis3 tinim6 tinim5 tinim4 tinim3 00000000
10 10-39 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tin interrupt control register 4 (tinir4) b bit name function r w 0 tinis19 (tin19 interrupt request status bit) 0: interrupt not requested r(note 1) 1 tinis18 (tin18 interrupt request status bit) 1: interrupt requested 2 tinis17 (tin17 interrupt request status bit) 3 tinis16 (tin16 interrupt request status bit) 4-7 no function assigned. fix to "0". 00 note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. tin interrupt controlregister 5 (tinir5) b bit name function r w 8 tinim19 (tin19 interrupt request mask bit) 0: enable interrupt request r w 9 tinim18 (tin18 interrupt request mask bit) 1: mask (disable) interrupt request 10 tinim17 (tin17 interrupt request mask bit) 11 tinim16 (tin16 interrupt request mask bit) 12 tinim15 (reserved bit) fix to "0". 0 0 13 tinim14 (reserved bit) 14 tinim13 (reserved bit) 15 tinim12 (reserved bit) b0123456b7 tinis19 tinis18 tinis17 tinis16 00000000 b8 9 1011121314b15 tinim19 tinim18 tinim17 tinim16 tinim15 tinim14 tinim13 tinim12 00000000
10 10-40 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) figure 10.2.14 block diagram of mjt input interrupt 2 mjt input interrupt 2 irq10 data bus b0 tinis19 f/f tinim19 f/f b8 b1 tinis18 f/f tinim18 f/f b9 b2 tinis17 f/f tinim17 f/f b10 b3 tinis16 f/f tinim16 f/f b11 (level) 4-source inputs tinir4 tinir5 tin19edge tin18edge tin17edge tin16edge
10 10-41 multijunction timers 10.2 common units of multijunction timers 32176 group user?s manual (rev.1.01) tin interrupt control register 6 (tinir6) b bit name function r w 0 tinis23 (tin23 interrupt request status bit) 0: interrupt not requested r(note 1) 1 tinis22 (tin22 interrupt request status bit) 1: interrupt requested 2 tinis21 (tin21 interrupt request status bit) 3 tinis20 (tin20 interrupt request status bit) 4 tinim23 (tin23 interrupt request mask bit) 0: enable interrupt request r w 5 tinim22 (tin22 interrupt request mask bit) 1: mask (disable) interrupt request 6 tinim21 (tin21 interrupt request mask bit) 7 tinim20 (tin20 interrupt request mask bit) note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. figure 10.2.15 block diagram of mjt input interrupt 3 mjt input interrupt 3 irq11 data bus b0 tinis23 f/f tinim23 f/f b4 b1 tinis22 f/f tinim22 f/f b5 b2 tinis21 f/f tinim21 f/f b6 b3 tinis20 f/f tinim20 f/f b7 4-source inputs tinir6 tin23edge tin22edge tin21edge tin20edge (level) b0123456b7 tinis23 tinis22 tinis21 tinis20 tinim23 tinim22 tinim21 tinim20 00000000
10 10-42 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3 top (output-related 16-bit timer) 10.3.1 outline of top top (timer output) is an output-related 16-bit timer, whose operation mode can be selected from the following by mode switching in software: ? single-shot output mode ? delayed single-shot output mode ? continuous output mode table 10.3.1 below shows specifications of top. figure 10.3.1 shows a block diagram of top. table 10.3.1 specifications of top (output-related 16-bit timer) item specification number of channels 11 channels counter 16-bit down-counter reload register 16-bit reload register correction register 16-bit correction register timer startup started by writing to the enable bit in software or enabled by external input (rising or falling edge or both) mode switching ? single-shot output mode ? delayed single-shot output mode ? continuous output mode interrupt request generation can be generated by a counter underflow
10 10-43 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) figure 10.3.1 block diagram of top (output-related 16-bit timer) irq2 clk en udf top 0 clock bus input event bus clk en udf top 1 clk en udf top 2 clk en udf top 3 output event bus tclk0s to 0 (p110) irq9 3 2 1 0 clk en udf top 4 clk en udf top 5 tclk0 (p124) tin0 (p150) s s tin0s clk en udf top 6 clk en udf top 7 s s s s s clk en udf top 8 clk en udf top 9 clk en udf top 10 f/f0 f/f1 f/f2 f/f3 f/f4 f/f5 f/f6 f/f7 f/f8 f/f9 f/f10 s : selector f/f :output flip-flop s s s s s irq2 irq2 irq2 irq2 irq2 to 1 (p111) to 2 (p112) to 3 (p113) to 4 (p114) to 5 (p115) to 6 (p116) to 7 (p117) to 8 (p100) to 9 (p101) to 10 (p102) irq1 irq1 irq6 irq6 irq5 3 2 1 0 0 1 2 3 reload register down-counter correction register 3 2 1 0 3 2 1 0 0 1 2 3 (16-bit) drq7
10 10-44 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.2 outline of each mode of top each mode of top is outlined below. for each top channel, only one of the following modes can be selected. (1) single-shot output mode in single-shot output mode, the timer generates a pulse in width of (reload register set value + 1) only once and then stops. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the reload register, the counter is loaded with the content of the reload register and starts counting synchronously with the count clock. the counter counts down and stops when it underflows after reaching the minimum count. the f/f output waveform in single-shot output mode is inverted at startup and upon underflow, generating a single-shot pulse waveform in width of (reload register set value + 1) only once. an interrupt request can be generated when the counter underflows. (2) delayed single-shot output mode in delayed single-shot output mode, the timer generates a pulse in width of (reload register set value + 1) after a finite time equal to (counter set value + 1) only once and then stops. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the counter and reload register, it starts counting down from the counter?s set value synchronously with the count clock. the first time the counter underflows, it is loaded with the reload register value and continues counting down. the counter stops when it underflows next time. the f/f output waveform in delayed single-shot output mode is inverted when the counter underflows first time and next, generating a single-shot pulse waveform in width of (reload register set value + 1) after a finite time equal to (first set value of counter + 1) only once. an interrupt request can be generated when the counter underflows first time and next. (3) continuous output mode in continuous output mode, the timer counts down starting from the set value of the counter and when the counter underflows, it is loaded with the reload register value. thereafter, this operation is repeated each time the counter underflows, thus generating consecutive pulses whose waveform is inverted in width of (reload register set value + 1). when the timer is enabled (by writing to the enable bit in software or by external input) after setting the counter and reload register, it starts counting down from the counter?s set value synchronously with the count clock and when the minimum count is reached, generates an underflow. this underflow causes the counter to be loaded with the content of the reload register and start counting over again. thereafter, this operation is repeated each time an underflow occurs. to stop the counter, disable count by writing to the enable bit in software. the f/f output waveform in continuous output mode is inverted at startup and upon underflow, generating a waveform of consecutive pulses until the timer stops counting. an interrupt request can be generated each time the counter underflows.
10 10-45 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) ? because the timer operates synchronously with the count clock, there is a count clock-dependent delay from when the timer is enabled till when it actually starts operating. in operation mode where the f/f output is inverted when the timer is enabled, the f/f output is inverted synchronously with the count clock. bclk count clock enable f/f operation (note 1) count clock period count clock-dependent delay write to the enable bit note 1: this applies to the case where f/f output is inverted when the timer is enabled. inverted figure 10.3.2 count clock dependent delay
10 10-46 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.3 top related register map shown below is a top related register map. top related register map (1/2) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0240 top0 counter 10-53 (top0ct) h'0080 0242 top0 reload register 10-54 (top0rl) h'0080 0244 (use inhibited area) h'0080 0246 top0 correction register 10-55 (top0cc) (use inhibited area) h'0080 0250 top1 counter 10-53 (top1ct) h'0080 0252 top1 reload register 10-54 (top1rl) h'0080 0254 (use inhibited area) h'0080 0256 top1 correction register 10-55 (top1cc) (use inhibited area) h'0080 0260 top2 counter 10-53 (top2ct) h'0080 0262 top2 reload register 10-54 (top2rl) h'0080 0264 (use inhibited area) h'0080 0266 top2 correction register 10-55 (top2cc) (use inhibited area) h'0080 0270 top3 counter 10-53 (top3ct) h'0080 0272 top3 reload register 10-54 (top3rl) h'0080 0274 (use inhibited area) h'0080 0276 top3 correction register 10-55 (top3cc) (use inhibited area) h'0080 0280 top4 counter 10-53 (top4ct) h'0080 0282 top4 reload register 10-54 (top4rl) h'0080 0284 (use inhibited area) h'0080 0286 top4 correction register 10-55 (top4cc) (use inhibited area) h'0080 0290 top5 counter 10-53 (top5ct) h'0080 0292 top5 reload register 10-54 (top5rl) h'0080 0294 (use inhibited area) h'0080 0296 top5 correction register 10-55 (top5cc) h'0080 0298 (use inhibited area) | | | | |
10 10-47 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) top related register map (2/2) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 029a top0?5 control register 0 10-49 (top05cr0) h'0080 029c (use inhibited area) top0?5 control register 1 10-49 (top05cr1) h'0080 029e (use inhibited area) h'0080 02a0 top6 counter 10-53 (top6ct) h'0080 02a2 top6 reload register 10-54 (top6rl) h'0080 02a4 (use inhibited area) h'0080 02a6 top6 correction register 10-55 (top6cc) h'0080 02a8 (use inhibited area) h'0080 02aa top6,7 control register 10-51 (top67cr) (use inhibited area) h'0080 02b0 top7 counter 10-53 (top7ct) h'0080 02b2 top7 reload register 10-54 (top7rl) h'0080 02b4 (use inhibited area) h'0080 02b6 top7 correction register 10-55 (top7cc) (use inhibited area) h'0080 02c0 top8 counter 10-53 (top8ct) h'0080 02c2 top8 reload register 10-54 (top8rl) h'0080 02c4 (use inhibited area) h'0080 02c6 top8 correction register 10-55 (top8cc) (use inhibited area) h'0080 02d0 top9 counter 10-53 (top9ct) h'0080 02d2 top9 reload register 10-54 (top9rl) h'0080 02d4 (use inhibited area) h'0080 02d6 top9 correction register 10-55 (top9cc) (use inhibited area) h'0080 02e0 top10 counter 10-53 (top10ct) h'0080 02e2 top10 reload register 10-54 (top10rl) h'0080 02e4 (use inhibited area) h'0080 02e6 top10 correction register 10-55 (top10cc) h'0080 02e8 (use inhibited area) h'0080 02ea top8?10 control register 10-52 (top810cr) (use inhibited area) h'0080 02fa top0-10 external enable permit register 10-56 (topeen) h'0080 02fc top0-10 enable protect register 10-56 (toppro) h'0080 02fe top0-10 count enable register 10-57 (topcen) | | | | |
10 10-48 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.4 top control registers the top control registers are used to select operation modes of top0?10 (single-shot output, delayed single- shot output or continuous output mode), as well as select the count enable and count clock sources. following top control registers are provided for each timer group. ? top0?5 control register 0 (top05cr0) ? top0?5 control register 1 (top05cr1) ? top6,7 control register (top67cr) ? top8?10 control register (top810cr)
10 10-49 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) top0?5 control register 0 (top05cr0) b bit name function r w 0, 1 top3m (top3 operation mode select bit) 00: single-shot output mode r w 2, 3 top2m (top2 operation mode select bit) 01: delayed single-shot output mode 4, 5 top1m (top1 operation mode select bit) 10: continuous output mode 6, 7 top0m (top0 operation mode select bit) 11: continuous output mode 8 no function assigned. fix to "0". 00 9?11 top05ens 000: external tin0 input r w top0?5 enable source select bit 001: external tin0 input 010: external tin0 input 011: external tin0 input 100: input event bus 0 101: input event bus 1 110: input event bus 2 111: input event bus 3 12, 13 no function assigned. fix to "0". 00 14, 15 top05cks 00: clock bus 0 r w top0?5 clock source select bit 01: clock bus 1 10: clock bus 2 11: clock bus 3 notes: ? this register must always be accessed in halfwords. ? operation mode can only be set or changed while the counter is inactive. top0?5 control register 1 (top05cr1) b bit name function r w 8?11 no function assigned. fix to "0". 00 12, 13 top5m (top5 operation mode select bit) 00: single-shot output mode r w 14, 15 top4m (top4 operation mode select bit) 01: delayed single-shot output mode 10: continuous output mode 11: continuous output mode note: ? operation mode can only be set or changed while the counter is inactive. b01234567891011121314b15 top3m top2m top1m top0m top05ens top05cks 0000000000000000 b8 9 1011121314b15 top5m top4m 00000000
10 10-50 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) clk en top 0 clock bus input event bus clk en top 1 clk en top 2 clk en top 3 3 2 1 0 clk en top 4 clk en top 5 s s : selector tin0 (p150) s tin0s 3 2 1 0 note:  this diagram only illustrates top control registers and is partly omitted. irq9 drq7 figure 10.3.3 outline diagram of top0?5 clock and enable inputs
10 10-51 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) top6,7 control register (top67cr) b bit name function r w 0 no function assigned. fix to "0". 00 1 top7ens 0: result selected by top67ens bit r w top7 enable source select bit 1: top6 output 2, 3 top7m 00: single-shot output mode r w top7 operation mode select bit 01: delayed single-shot output mode 10: continuous output mode 11: continuous output mode 4, 5 no function assigned. fix to "0". 00 6, 7 top6m 00: single-shot output mode r w top6 operation mode select bit 01: delayed single-shot output mode 10: continuous output mode 11: continuous output mode 8 no function assigned. fix to "0". 00 9?11 top67ens 000: does not select enable source r w top6, top7 enable source select bit 001: does not select enable source 010: does not select enable source 011: does not select enable source 100: input event bus 0 101: input event bus 1 110: input event bus 2 111: input event bus 3 12, 13 no function assigned. fix to "0". 00 14, 15 top67cks 00: clock bus 0 r w top6, top7 clock source select bit 01: clock bus 1 10: clock bus 2 11: clock bus 3 note 1: this register must always be accessed in halfwords. note : ? operation mode can only be set or changed while the counter is inactive. clock bus input event bus 3 2 1 0 clk en udf top 6 clk en udf top 7 s s s : selector 3 2 1 0 s note:  this diagram only illustrates top control registers and is partly omitted. figure 10.3.4 outline diagram of top6, top7 clock and enable inputs b01234567891011121314b15 top7m top6m top67ens top67cks 0 00000000000000 top7 ens 0
10 10-52 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) clock bus input event bus 3 2 1 0 s s clk en top 8 clk en top 9 clk en top 10 s : selector 3 2 1 0 note:  this diagram only illustrates top control registers and is partly omitted. figure 10.3.5 outline diagram of top8?10 clock and enable inputs top8?10 control register (top810cr) b bit name function r w 0, 1 no function assigned. fix to "0". 00 2, 3 top10m 00: single-shot output mode r w top10 operation mode select bit 01: delayed single-shot output mode 4, 5 top9m 10: continuous output mode top9 operation mode select bit 11: continuous output mode 6, 7 top8m top8 operation mode select bit 8?10 no function assigned. fix to "0". 00 11 top810ens 0: does not select enable source r w top8?10 enable source select bit 1: input event bus 3 12, 13 no function assigned. fix to "0". 00 14, 15 top810cks 00: clock bus 0 r w top8?10 clock source select bit 01: clock bus 1 10: clock bus 2 11: clock bus 3 notes: ? this register must always be accessed in halfwords. ? operation mode can only be set or changed while the counter is inactive. b01234567891011121314b15 top10m top9m top8m top810cks 00000000000 0000 top810 ens 0
10 10-53 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.5 top counters (top0ct?top10ct) top0 counter (top0ct) top1 counter (top1ct) top2 counter (top2ct) top3 counter (top3ct) top4 counter (top4ct) top5 counter (top5ct) top6 counter (top6ct) top7 counter (top7ct) top8 counter (top8ct) top9 counter (top9ct) top10 counter (top10ct) b bit name function r w 0?15 top0ct?top10ct 16-bit counter value r w note: ? these registers must always be accessed in halfwords. the top counters are a 16-bit down-counter. after the timer is enabled (by writing to the enable bit in software or by external input), the counter starts counting synchronously with the count clock. b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 top0ct-top10ct ????????????????
10 10-54 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.6 top reload registers (top0rl?top10rl) top0 reload register (top0rl) top1 reload register (top1rl) top2 reload register (top2rl) top3 reload register (top3rl) top4 reload register (top4rl) top5 reload register (top5rl) top6 reload register (top6rl) top7 reload register (top7rl) top8 reload register (top8rl) top9 reload register (top9rl) top10 reload register (top10rl) b bit name function r w 0?15 top0rl?top10rl 16-bit reload register value r w note: ? these registers must always be accessed in halfwords. the top reload registers are used to load data into the top counter registers (top0ct?top10ct). the content of the reload register is loaded into the counter in the following cases: ? when the counter is enabled in single-shot output mode ? when the counter underflowed in delayed single-shot or continuous output mode simply because data is written to the reload register does not mean that the data is loaded into the counter. the counter is loaded with data in only the above cases. note that reloading of data after an underflow is performed synchronously with a clock pulse at which the counter underflowed. b01234567891011121314b15 top0rl-top10rl ? ???????????????
10 10-55 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.7 top correction registers (top0cc?top10cc) top0 correction register (top0cc) top1 correction register (top1cc) top2 correction register (top2cc) top3 correction register (top3cc) top4 correction register (top4cc) top5 correction register (top5cc) top6 correction register (top6cc) top7 correction register (top7cc) top8 correction register (top8cc) top9 correction register (top9cc) top10 correction register (top10cc) (acceptable range of values: +32767 to ?32768) b bit name function r w 0?15 top0cc?top10cc 16-bit correction register value r w note: ? these registers must always be accessed in halfwords. the top correction registers are used to correct the top counter value by adding or subtracting in the middle of operation. to increase or reduce the counter value, write to this correction register a value by which the counter value is to be increased or reduced from its initial set value. to add, write the value to be added to the correction register directly as is. to subtract, write the 2?s complement of the value to be subtracted to the correction register. the counter is corrected synchronously with a clock pulse next to one at which the correction value was written to the top correction register. if the counter is corrected this way, note that because one down count in that clock period is canceled, the counter value actually is corrected by (correction register value + 1). for example, if the initial counter value is 10 and the value 3 is written to the correction register when the counter has counted down to 5, then the counter counts a total of 15 before it underflows. b01234567891011121314b15 top0cc-top10cc ? ???????????????
10 10-56 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.8 top enable control registers top0-10 external enable permit register (topeen) b bit name function r w 0?4 no function assigned. fix to "0". 00 5 top10een (top10 external enable permit bit) 0: disable external enable r w 6 top9een (top9 external enable permit bit) 1: enable external enable 7 top8een (top8 external enable permit bit) 8 top7een (top7 external enable permit bit) 9 top6een (top6 external enable permit bit) 10 top5een (top5 external enable permit bit) 11 top4een (top4 external enable permit bit) 12 top3een (top3 external enable permit bit) 13 top2een (top2 external enable permit bit) 14 top1een (top1 external enable permit bit) 15 top0een (top0 external enable permit bit) note: ? this register must always be accessed in halfwords. the top0-10 external enable permit register controls enable operation on top counters from external de- vices by enabling or disabling it. top0-10 enable protect register (toppro) b bit name function r w 0?4 no function assigned. fix to "0". 00 5 top10pro (top10 enable protect bit) 0: enable for rewriting r w 6 top9pro (top9 enable protect bit) 1: protect against rewriting 7 top8pro (top8 enable protect bit) 8 top7pro (top7 enable protect bit) 9 top6pro (top6 enable protect bit) 10 top5pro (top5 enable protect bit) 11 top4pro (top4 enable protect bit) 12 top3pro (top3 enable protect bit) 13 top2pro (top2 enable protect bit) 14 top1pro (top1 enable protect bit) 15 top0pro (top0 enable protect bit) note: ? this register must always be accessed in halfwords. the top0-10 enable protect register controls rewriting of the top0-10 count enable bit by enabling for or protecting it against rewriting. top10 top9 top8 top7 top6 top5 top4 top3 top2 top1 top0 een een een een een een een een een een een 00000000000 b01234567891011121314b15 00000 top10 top9 top8 top7 top6 top5 top4 top3 top2 top1 top0 pro pro pro pro pro pro pro pro pro pro pro 00000000000 b01234567891011121314b15 00000
10 10-57 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) top0-10 count enable register (topcen) b bit name function r w 0?4 no function assigned. fix to "0". 00 5 top10cen (top10 count enable bit) 0: stop counting r w 6 top9cen (top9 count enable bit) 1: enable counting 7 top8cen (top8 count enable bit) 8 top7cen (top7 count enable bit) 9 top6cen (top6 count enable bit) 10 top5cen (top5 count enable bit) 11 top4cen (top4 count enable bit) 12 top3cen (top3 count enable bit) 13 top2cen (top2 count enable bit) 14 top1cen (top1 count enable bit) 15 top0cen (top0 count enable bit) note: ? this register must always be accessed in halfwords. the top0-10 count enable register controls operation of top counters. to enable any top counter in soft- ware, enable its corresponding enable protect bit for write and set the count enable bit by writing "1". to stop any top counter, enable its corresponding enable protect bit for write and reset the count enable bit by writing "0". in all but continuous output mode, when the counter stops due to occurrence of an underflow, the count enable bit is automatically reset to "0". therefore, the top0-10 count enable register when accessed for read serves as a status register indicating whether the counter is operating or idle. wr bn topm enable protect (topmpro) wr en-on topm external enable (topmeen) tinns topm enable (topmcen) top enable control input processing selection f/f f/f f/f event bus tinn figure 10.3.6 configuration of the top enable circuit b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 00000 top10 top9 top8 top7 top6 top5 top4 top3 top2 top1 top0 cen cen cen cen cen cen cen cen cen cen cen 00000000000
10 10-58 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.9 operation in top single-shot output mode (with correction function) (1) outline of top single-shot output mode in single-shot output mode, the timer generates a pulse in width of (reload register set value + 1) only once and then stops. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the reload register, the counter is loaded with the content of the reload register and starts counting synchronously with the count clock. the counter counts down and stops when it underflows after reaching the minimum count. the f/f output waveform in single-shot output mode is inverted (f/f output levels change from low to high or vice versa) at startup and upon underflow, generating a single-shot pulse waveform in width of (reload regis- ter set value + 1) only once. an interrupt request can be generated when the counter underflows. the count value is (reload register set value + 1). for example, if the initial reload register value is 7, then the count value is 8. figure 10.3.7 example of counting in top single-shot output mode enable reload register (7) 6 5 4 3 123 456 78 h'ffff 7 counter interrupt request underflow count value = 8 (note 1) note 1: what actually is seen in the cycle immediately after reload is the previous counter value, and not 7. note:  this diagram does not show detailed timing information. 2 1 0 f/f output count clock * a count clock dependent delay is included before f/f output changes state after the timer is enabled. *
10 10-59 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) in the example below, the reload register is initially set to h?a000. (the initial counter value can be undefined, and does not have to be specific.) when the timer starts, the reload register value is loaded into the counter, letting it start counting. thereafter, it continues counting down until it underflows after reaching the minimum count. count clock correction register h'ffff h'0000 enabled (by writing to the enable bit or by external input) f/f output disabled (by underflow) (unused) top interrupt request due to underflow enable bit starts counting down from the reload register set value note:  this diagram does not show detailed timing information. reload register h'a000 data inverted by enable counter h'a000 data inverted by underflow h'ffff h'(a000-1) undefined value figure 10.3.8 typical operation in top single-shot output mode
10 10-60 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) when writing to the correction register, be careful not to cause the counter to overflow. even if the counter overflows due to correction of counts, no interrupt requests are generated for reasons of an overflow. (2) correction function of top single-shot output mode to change the counter value while in progress, write to the top correction register a value by which the counter value is to be increased or reduced from its initial set value. to add, write the value to be added to the correction register directly as is. to subtract, write the 2?s complement of the value to be subtracted to the correction register. the counter is corrected synchronously with a count clock pulse next to one at which the correction value was written to the top correction register. if the counter is corrected this way, note that because one down count in that clock period is canceled, the counter value actually is corrected by (correction register value + 1). for example, if the initial counter value is 7 and the value 3 is written to the correction register when the counter has counted down to 3, then the counter counts a total of 12 before it underflows. figure 10.3.9 example of counting in top single-shot output mode when count is corrected (7) 6 5 4 3 2 1 0 1234567891011 12 6 5 4 3 7 3 correction register +3 underflow count value = (7 + 1) + (3 + 1) = 12 count clock dependent delay h'ffff enable reload register counter interrupt request count clock (note 1) note 1: what actually is seen in the cycle immediately after reload is the previous counter value, and not 7. note:  this diagram does not show detailed timing information.
10 10-61 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) figure 10.3.10 typical operation in top single-shot output mode when count is corrected data inverted by enable data inverted by underflow h'(8000-1) h'ffff h'0000 h'8000 h'5000 h'5000+h'4000 h'8000 h'ffff undefined h'4000 count clock correction register enabled (by writing to the enable bit or by external input) f/f output top interrupt request due to underflow enable bit note:  this dia g ram does not show detailed timin g information. reload register write to the correction register undefined value disabled (by underflow) counter in the example below, the reload register is initially set to h?8000. when the timer starts, the reload register value is loaded into the counter, letting it start counting down. in the diagram below, the value h?4000 is written to the correction register when the counter has counted down to h?5000. as a result of this correction, the count has been increased to h?9000, so that the counter counts a total of (h?8000 + 1 + h?4000 + 1) before it stops.
10 10-62 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) (3) precautions on using top single-shot output mode the following describes precautions to be observed when using top single-shot output mode. ? if the counter stops due to an underflow in the same clock period as the timer is enabled by external input, the former has priority so that the counter stops. ? if the counter stops due to an underflow in the same clock period as count is enabled by writing to the enable bit, the latter has priority so that count is enabled. ? if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled. ? because the timer operates synchronously with the count clock, a count clock-dependent delay is included before starting f/f operation after the timer is enabled. ? when writing to the correction register, be careful not to cause the counter to overflow. even if the counter overflows due to correction of counts, no interrupt requests are generated for reasons of an overflow. therefore, if the counter underflows in the subsequent down-count after an overflow, a false interrupt re- quest is generated for an underflow that includes the overflowed count.
10 10-63 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) h'ffff h'0000 h'fff8 h'(fff0+0014) h'0004 h'fff0 h'0014 h'fff8 h'ffff data inverted by enable data inverted by underflow h'(fff8-1) counter count clock correction register f/f output top interrupt request due to underflow enable bit note:  this dia g ram does not show detailed timin g information. reload register write to the correction register enabled (by writing to the enable bit or by external input) disabled (by underflow) undefined value actual count after overflow overflow occurs undefined figure 10.3.11 example of an operation in top single-shot output mode where count overflows due to correction in the example below, the reload register is initially set to h?fff8. when the timer starts, the reload register value is loaded into the counter, letting it start counting down. in the diagram below, the value h?0014 is written to the correction register when the counter has counted down to h?fff0. as a result of this correction, the count overflows to h?0004 and the counter fails to count correctly. also, an interrupt request is generated for an erroneous overflowed count.
10 10-64 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.10 operation in top delayed single-shot output mode (with correction function) (1) outline of top delayed single-shot output mode in delayed single-shot output mode, the timer generates a pulse in width of (reload register set value + 1) after a finite time equal to (counter set value + 1) only once and then stops. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the counter and reload register, it starts counting down from the counter?s set value synchronously with the count clock. the first time the counter underflows, it is loaded with the reload register value and continues counting down. the counter stops when it underflows next time. the f/f output waveform in delayed single-shot output mode is inverted (f/f output level changes from low to high or vice versa) when the counter underflows first time and next, generating a single-shot pulse waveform in width of (reload register set value + 1) after a finite time equal to (first set value of counter + 1) only once. an interrupt request can be generated when the counter underflows first time and next. the (counter set value + 1) and (reload register set value + 1) are effective as count values. for example, if the initial counter value is 4 and the initial reload register value is 5, then the timer operates as shown below. figure 10.3.12 example of counting in top delayed single-shot output mode 4 3 2 1 123 45 678 5 f/f output 9 10 11 0 3 2 1 0 4 (5) (note 1) h'ffff count clock dependent delay enable reload register counter interrupt request count clock note 1: what actually is seen in the cycle immediately after reload is the h'ffff (underflow value), and not 5. note:  this diagram does not show detailed timing information. underflow underflow count value = (4 + 1) + (5 + 1) = 11
10 10-65 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) in the example below, the counter and the reload register are initially set to h?a000 and h?f000, respectively. when the timer is enabled, the counter starts counting down and when it underflows after reaching the minimum count, the counter is loaded with the content of the reload register and continues counting down. the counter stops when it underflows second time. figure 10.3.13 typical operation in top delayed single-shot output mode h'ffff h'0000 underflow (first time) count down from the counter's set value h'a000 underflow (second time) h'f000 count down from the reload register's set value h'(f000-1) (unused) h'ffff h'f000 data inverted by underflow data inverted by underflow count clock correction register enabled (by writing to the enable bit or by external input) f/f output top interrupt request due to underflow enable bit note:  this dia g ram does not show detailed timin g information. reload register counter
10 10-66 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) (2) correction function of top delayed single-shot output mode to change the counter value while in progress, write to the top correction register a value by which the counter value is to be increased or reduced from its initial set value. to add, write the value to be added to the correction register directly as is. to subtract, write the 2?s complement of the value to be subtracted to the correction register. the counter is corrected synchronously with a count clock pulse next to one at which the correction value was written to the top correction register. if the counter is corrected this way, note that because one down count in that clock period is canceled, the counter value actually is corrected by (correction register value + 1). for example, if the reload register value is 7 and the value 3 is written to the correction register when the counter has counted down to 3 after being reloaded, then the counter counts a total of 12 after being reloaded before it underflows. enable = "h" (7) 6 5 4 3 2 1 0 12345678 9101112 6 5 4 3 7 +3 (note 1) 0 h'ffff 3 underflow correction register reload register counter interrupt request count clock note 1: what actually is seen in the cycle immediately after reload is the h'ffff (underflow value), and not 7. note:  this diagram does not show detailed timing information. count value after being reloaded = (7 + 1) + (3 + 1) = 12 figure 10.3.14 example of counting in top delayed single-shot output mode when count is corrected when writing to the correction register, be careful not to cause the counter to overflow. even if the counter overflows due to correction of counts, no interrupt requests are generated for reasons of an overflow.
10 10-67 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) figure 10.3.15 typical operation in top delayed single-shot output mode when count is corrected h'ffff h'0000 h'9000+h'0008 h'f000 h'a000 h'f000 h'(f000+0008+1) h'0008 write to the correction register h'9000 data inverted by underflow data inverted by underflow correction register f/f output top interrupt request due to underflow enable bit note:  this dia g ram does not show detailed timin g information. reload register counter count clock underflow (first time) underflow (second time) enabled (by writing to the enable bit or by external input) undefined in the example below, the counter and the reload register are initially set to h?a000 and h?f000, respectively. when the timer is enabled, the counter starts counting down and when it underflows first time after reaching the minimum count, the counter is loaded with the content of the reload register and continues counting down. in the diagram below, the value h?0008 is written to the correction register when the counter has counted down to h?9000. as a result of this correction, the counter has its count value increased to h?9008 and counts (h?f000 + 1 + h?0008 + 1) after the first underflow before it stops.
10 10-68 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) (3) precautions on using top delayed single-shot output mode the following describes precautions to be observed when using top delayed single-shot output mode. ? if the counter stops due to an underflow in the same clock period as the timer is enabled by external input, the former has priority so that the counter stops. ? if the counter stops due to an underflow in the same clock period as count is enabled by writing to the enable bit, the latter has priority so that count is enabled. ? if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled. ? even if the counter overflows due to correction of counts, no interrupt requests are generated for reasons of an overflow. therefore, if the counter underflows in the subsequent down-count after an overflow, a false interrupt request is generated for an underflow that includes the overflowed count. ? if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge. figure 10.3.16 counter value immediately after underflow count clock enable bit "h" h'0001 h'0000 h'ffff h'aaa9 h'aaa8 counter value h'aaaa reload register reload due to underflow h'(aaaa-1) h'(aaaa-2) what is seen during reload cycle is always h'ffff, and not the reload register value (in this case, h'aaaa). count down from the reload register value reload cycle
10 10-69 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.3.11 operation in top continuous output mode (without correction function) (1) outline of top continuous output mode in continuous output mode, the timer counts down starting from the set value of the counter and when the counter underflows, it is loaded with the reload register value. thereafter, this operation is repeated each time the counter underflows, thus generating consecutive pulses whose waveform is inverted in width of (reload register set value + 1). when the timer is enabled (by writing to the enable bit in software or by external input) after setting the counter and reload register, it starts counting down from the counter?s set value synchronously with the count clock and when the minimum count is reached, generates an underflow. this underflow causes the counter to be loaded with the content of the reload register and start counting over again. thereafter, this operation is repeated each time an underflow occurs. to stop the counter, disable count by writing to the enable bit in software. the f/f output waveform in continuous output mode is inverted (f/f output level changes from low to high or vice versa) at startup and upon underflow, generating a waveform of consecutive pulses until the timer stops counting. an interrupt request can be generated each time the counter underflows. the (counter set value + 1) and (reload register set value + 1) are effective as count values. for example, if the initial counter value is 4 and the initial reload register value is 5, then the timer operates as shown below. figure 10.3.17 example of counting in top continuous output mode (4) 3 2 1 1234 5 (note 1) f/f output 0 3 2 1 0 4 (5) (note 2) 3 2 1 0 (5) (5) 4 5 123456 12345 6 count clock dependent delay enable reload register counter interrupt request count clock underflow note 1: what actually is seen in the cycle immediately after enable is the previous counter value, and not 4. note 2: what actually is seen in the cycle immediately after reload is h'ffff (underflow value), and not 5. note:  this dia g ram does not show detailed timin g information. underflow underflow (note 2) (note 2) count value = 5 count value = 6 count value = 6
10 10-70 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) in the example below, the counter and the reload register are initially set to h?a000 and h?e000, respectively. when the timer is enabled, the counter starts counting down and when it underflows after reaching the minimum count, the counter is loaded with the content of the reload register and continues counting down. h'ffff h'0000 h'e000 h'a000 h'e000 h'(e000-1) h'(e000-1) h'ffff h'ffff data inverted by underflow data inverted by underflow data inverted by enable count clock correction register f/f output top interrupt request due to underflow enable bit note:  this dia g ram does not show detailed timin g information. reload register counter underflow (first time) underflow (second time) enabled (by writing to the enable bit or by external input) count down from the counter's set value count down from the reload register's set value count down from the reload register's set value (unused) figure 10.3.18 typical operation in top continuous output mode
10 10-71 multijunction timers 10.3 top (output-related 16-bit timer) 32176 group user?s manual (rev.1.01) (2) precautions on using top continuous output mode the following describes precautions to be observed when using top continuous output mode. ? if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled. ? if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge. ? because the timer operates synchronously with the count clock, a count clock-dependent delay is included before f/f output is inverted after the timer is enabled.
10 10-72 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4 tio (input/output-related 16-bit timer) 10.4.1 outline of tio tio (timer input/output) is an input/output-related 16-bit timer, whose operation mode can be selected from the following by mode switching in software, one at a time: ? measure clear input mode ? measure free-run input mode ? noise processing input mode ? pwm output mode ? single-shot output mode ? delayed single-shot output mode ? continuous output mode the table below shows specifications of tio. the diagram in the next page shows a block diagram of tio. table 10.4.1 specifications of tio (input/output-related 16-bit timer) item specification number of channels 10 channels counter 16-bit down-counter reload register 16-bit reload register measure register 16-bit capture register timer startup started by writing to the enable bit in software or enabled by external input (rising or falling or both edges or high or low level) mode switching ? measure clear input mode ? measure free-run input mode ? noise processing input mode ? pwm output mode ? single-shot output mode ? delayed single-shot output mode ? continuous output mode interrupt request generation can be generated by a counter underflow dma transfer request generation can be generated by a counter underflow (for only the tio8)
10-73 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) figure 10.4.1 block diagram of tio (input/output-related 16-bit timer) irq12 clock bus input event bus output event bus 3 2 1 0 bclk/2 tclk1 (p125) clk en/cap udf tio 0 clk en/cap udf tio 1 clk en/cap udf tio 2 clk en/cap udf tio 3 clk en/cap udf tio 4 s s tin3s tin3 (p153) s s s s prs1 prs0 clk en/cap udf tio 5 s tclk1s s tclk2 (p126) clk en/cap udf tio 6 s tclk2s s clk en/cap udf tio 7 s s s s clk en/cap udf tio 8 clk en/cap udf tio 9 s s f/f11 f/f12 f/f13 f/f14 f/f15 s f/f16 f/f17 f/f18 f/f19 s s s s s s s s s to 11 (p103) to 12 (p104) to 13 (p105) to 14 (p106) to 15 (p107) irq0 irq0 irq0 irq0 irq4 to 16 (p93) to 17 (p94) to 18 (p95) to 19 (p96) to 20 (p97) irq4 irq4 irq4 drq0 irq3 3 2 1 0 0 1 2 3 0 1 2 3 3 2 1 0 3 2 1 0 prs2 reload 0/measure register down-counter reload 1 register (note 1) (16-bit) irq3 f/f20 s : selector f/f : flip-flop prs0?2 : prescaler note 1: the reload 1 register is used in only pwm output mode.
10 10-74 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.2 outline of each mode of tio each mode of tio is outlined below. for each tio channel, only one of the following modes can be selected. (1) measure clear/free-run input modes in measure clear/free-run input modes, the timer is used to measure a duration of time from when the counter starts counting till when an external capture signal is entered. after the timer is enabled (by writing to the enable bit in software), the counter starts counting down synchro- nously with the count clock. when a capture signal is entered from an external device, the counter value at that point in time is written into a register called the ?measure register.? in measure clear input mode, the counter value is initialized to h?ffff upon capture, from which the counter starts counting down again. in measure free-run input mode, the counter continues counting down even after capture. the counter returns to h?ffff upon underflow, from which it starts counting down again. to stop the counter, disable count by writing to the enable bit in software. furthermore, it is possible to generate an interrupt request upon underflow of the counter or execution of measurement operation and a dma transfer request (for only the ti08) upon underflow of the counter. (2) noise processing input mode in noise processing input mode, the timer is used to detect that the input signal remained in the same state for over a predetermined time. in noise processing input mode, a high or low level on external input activates the counter and if the input signal remains in the same state for over a predetermined time before the counter underflows, the counter generates an interrupt request before stopping. if the valid-level signal being applied turns to an invalid level before the counter underflows, the counter temporarily stops counting and when a valid-level signal is en- tered again, the counter is reloaded with the initial count and restarts counting. the timer stops at the same time the counter underflows or count is disabled by writing to the enable bit. furthermore, it is possible to generate an interrupt request and a dma transfer request (for only the ti08) upon underflow of the counter. (3) pwm output mode (without correction function) in pwm output mode, the timer uses two reload registers to generate a waveform with a given duty cycle. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the initial values in the reload 0 and reload 1 registers, the counter is loaded with the reload 0 register value and starts counting down synchronously with the count clock. the first time the counter underflows, it is loaded with the reload 1 register value and continues counting. thereafter, the counter is loaded with the reload 0 and reload 1 register values alternately each time an underflow occurs. the f/f output waveform in pwm output mode is inverted when the counter starts counting and each time it underflows. the timer stops at the same time count is disabled by writing to the enable bit (and not in synchro- nism with pwm output period). furthermore, it is possible to generate an interrupt request at even-numbered occurrences of underflow after the counter is enabled and a dma transfer request (for only the ti08) every time the counter underflows.
10-75 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) (4) single-shot output mode (without correction function) in single-shot output mode, the timer generates a pulse in width of (reload 0 register set value + 1) only once and then stops. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the reload 0 register, the counter is loaded with the reload 0 register value and starts counting synchronously with the count clock. the counter counts down and when the minimum count is reached, stops upon underflow. the f/f output waveform in single-shot output mode is inverted at startup and upon underflow, generating a single-shot pulse waveform in width of (reload 0 register set value + 1) only once. furthermore, it is possible to generate an interrupt request and a dma transfer request (for only the ti08) upon underflow of the counter. (5) delayed single-shot output mode (without correction function) in delayed single-shot output mode, the timer generates a pulse in width of (reload 0 register set value + 1) after a finite time equal to (counter set value + 1) only once and then stops. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the counter and reload 0 register, it starts counting down from the counter?s set value synchronously with the count clock. the first time the counter underflows, it is loaded with the reload 0 register value and continues counting down. the counter stops when it underflows next time. the f/f output waveform in delayed single-shot output mode is inverted when the counter underflows first time and next, generating a single-shot pulse waveform in width of (reload 0 register set value + 1) after a finite time equal to (first set value of counter + 1) only once. furthermore, it is possible to generate an interrupt request and a dma transfer request (for only the ti08) upon the first and next underflows of the counter. (6) continuous output mode (without correction function) in continuous output mode, the timer counts down starting from the set value of the counter and when the counter underflows, it is loaded with the reload 0 register value. thereafter, this operation is repeated each time the counter underflows, thus generating consecutive pulses in width of (reload 0 register set value + 1). when the timer is enabled (by writing to the enable bit in software or by external input) after setting the counter and reload 0 register, it starts counting down from the counter?s set value synchronously with the count clock and when the minimum count is reached, generates an underflow. this underflow causes the counter to be loaded with the content of the reload 0 register and start counting over again. thereafter, this operation is repeated each time an underflow occurs. to stop the counter, disable count by writing to the enable bit in software. the f/f output waveform in continuous output mode is inverted at startup and upon underflow, generating a waveform of consecutive pulses until the timer stops counting. furthermore, it is possible to generate an interrupt request and a dma transfer request (for only the ti08) each time the counter underflows.
10 10-76 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) ? because the timer operates synchronously with the count clock, there is a count clock-dependent delay from when the timer is enabled till when it actually starts operating. in operation mode where the f/f output is inverted when the timer is enabled, the f/f output is inverted synchronously with the count clock. bclk count clock enable f/f operation (note 1) count clock period count clock-dependent delay write to the enable bit note 1: this applies to the case where f/f output is inverted when the timer is enabled. inverted figure 10.4.2 count clock dependent delay
10-77 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.3 tio related register map shown below is a tio related register map. tio related register map (1/2) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0300 tio0 counter 10-87 (tio0ct) h'0080 0302 (use inhibited area) h'0080 0304 tio0 reload 1 register 10-89 (tio0rl1) h'0080 0306 tio0 reload 0/measure register 10-88 (tio0rl0) (use inhibited area) h'0080 0310 tio1 counter 10-87 (tio1ct) h'0080 0312 (use inhibited area) h'0080 0314 tio1 reload 1 register 10-89 (tio1rl1) h'0080 0316 tio1 reload 0/measure register 10-88 (tio1rl0) h'0080 0318 (use inhibited area) h'0080 031a tio0?3 control register 0 10-80 (tio03cr0) h'0080 031c (use inhibited area) tio0?3 control register 1 10-81 (tio03cr1) h'0080 031e (use inhibited area) h'0080 0320 tio2 counter 10-87 (tio2ct) h'0080 0322 (use inhibited area) h'0080 0324 tio2 reload 1 register 10-89 (tio2rl1) h'0080 0326 tio2 reload 0/measure register 10-88 (tio2rl0) (use inhibited area) h'0080 0330 tio3 counter 10-87 (tio3ct) h'0080 0332 (use inhibited area) h'0080 0334 tio3 reload 1 register 10-89 (tio3rl1) h'0080 0336 tio3 reload 0/measure register 10-88 (tio3rl0) (use inhibited area) h'0080 0340 tio4 counter 10-87 (tio4ct) h'0080 0342 (use inhibited area) h'0080 0344 tio4 reload 1 register 10-89 (tio4rl1) h'0080 0346 tio4 reload 0/measure register 10-88 (tio4rl0) h'0080 0348 (use inhibited area) h'0080 034a tio4 control register tio5 control register 10-82 (tio4cr) (tio5cr) 10-84 (use inhibited area) h'0080 0350 tio5 counter 10-87 (tio5ct) h'0080 0352 (use inhibited area) | | | |
10 10-78 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) tio related register map (2/2) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 0354 tio5 reload 1 register 10-89 (tio5rl1) h'0080 0356 tio5 reload 0/measure register 10-88 (tio5rl0) (use inhibited area) h'0080 0360 tio6 counter 10-87 (tio6ct) h'0080 0362 (use inhibited area) h'0080 0364 tio6 reload 1 register 10-89 (tio6rl1) h'0080 0366 tio6 reload 0/measure register 10-88 (tio6rl0) h'0080 0368 (use inhibited area) h'0080 036a tio6 control register tio7 control register 10-85 (tio6cr) (tio7cr) 10-86 (use inhibited area) h'0080 0370 tio7 counter 10-87 (tio7ct) h'0080 0372 (use inhibited area) h'0080 0374 tio7 reload 1 register 10-89 (tio7rl1) h'0080 0376 tio7 reload 0/measure register 10-88 (tio7rl0) (use inhibited area) h'0080 0380 tio8 counter 10-87 (tio8ct) h'0080 0382 (use inhibited area) h'0080 0384 tio8 reload 1 register 10-89 (tio8rl1) h'0080 0386 tio8 reload 0/measure register 10-88 (tio8rl0) h'0080 0388 (use inhibited area) h'0080 038a tio8 control register tio9 control register 10-86 (tio8cr) (tio9cr) 10-87 (use inhibited area) h'0080 0390 tio9 counter 10-87 (tio9ct) h'0080 0392 (use inhibited area) h'0080 0394 tio9 reload 1 register 10-89 (tio9rl1) h'0080 0396 tio9 reload 0/measure register 10-88 (tio9rl0) (use inhibited area) h'0080 03bc tio0-9 enable protect register 10-90 (tiopro) h'0080 03be tio0-9 count enable register 10-91 (tiocen) | | | | |
10-79 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.4 tio control registers the tio control registers are used to select operation modes of tio0?9 (measure input, noise processing input, pwm output, single-shot output, delayed single-shot output or continuous output mode), as well as select the count enable and count clock sources. following tio control registers are provided for each timer group. ? tio0?3 control register 0 (tio03cr0) ? tio0?3 control register 1 (tio03cr1) ? tio4 control register (tio4cr) ? tio5 control register (tio5cr) ? tio6 control register (tio6cr) ? tio7 control register (tio7cr) ? tio8 control register (tio8cr) ? tio9 control register (tio9cr)
10 10-80 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) tio0?3 control register 0 (tio03cr0) b bit name function r w 0 tio3een (note 1) 0: disable external input r w tio3 external input enable bit 1: enable external input 1?3 tio3m 000: single-shot output mode r w tio3 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: noise processing input mode 111: noise processing input mode 4 tio2ens (reserved bit) fix to "0" 0 0 5?7 tio2m 000: single-shot output mode r w tio2 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: use inhibited 111: use inhibited 8 tio1ens (reserved bit) fix to "0" 0 0 9?11 tio1m 000: single-shot output mode r w tio1 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: use inhibited 111: use inhibited 12 tio0ens 0: does not use enable/measure input source r w tio0 enable/measure input source select bit 1: external input tin3 13?15 tio0m 000: single-shot output mode r w tio0 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: noise processing input mode 111: noise processing input mode note 1: during measure free-run/clear input mode, even if this bit is set to "0" (external input disabled), when a capture sign al is entered from an external device, the counter value at that point in time is written into the measure register. in measure clear input mode, however, if this bit = "0" (external input disabled), the counter value is not initialized (h?ffff) upon capture an d, therefore, this bit should be set to "1" (external input enabled). notes: ? this register must always be accessed in halfwords. ? operation mode can only be set or changed while the counter is inactive. ? to select tio3 enable/measure input sources, use the tio4 control register tio34ens (tio3, tio4 enable/measure input source select) bits. ? tio1 and tio2 do not have the capture function during measure free-run/clear input mode. b01234567891011121314b15 tio3m tio2m tio1m tio0m 000 000 000 000 tio3 tio2 tio1 tio0 een ens ens ens 0000
10-81 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) tio0?3 control register 1 (tio03cr1)
b bit name function r w 8?13 no function assigned. fix to "0". 00 14, 15 tio03cks 00: clock bus 0 r w tio0?3 clock source select bit 01: clock bus 1 10: clock bus 2 11: clock bus 3 figure 10.4.3 outline diagram of tio0?4 clock and enable inputs clock bus input event bus 3 2 1 0 clk en/cap tio 0 clk en/cap tio 1 clk en/cap tio 2 clk en/cap tio 3 clk en/cap tio 4 s s tin3s tin3 (p153) s s s s s : selector 3 2 1 0 3 2 1 0 3 2 1 0 note:  this dia g ram onl y illustrates tio control re g isters and is p artl y omitted. b8 9 1011121314b15 tio03cks 00000000
10 10-82 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) tio4 control register (tio4cr) b bit name function r w 0, 1 tio4cks 00: clock bus 0 r w tio4 clock source select bit 01: clock bus 1 10: clock bus 2 11: clock bus 3 2 tio4een (note 1) 0: disable external input r w tio4 external input enable bit 1: enable external input 3, 4 tio34ens 00: does not use enable/measure input source r w tio3,4 enable/measure input source select bit 01: does not use enable/measure input source 10: input event bus 2 11: input event bus 3 5?7 tio4m 000: single-shot output mode r w tio4 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: noise processing input mode 111: noise processing input mode note 1: during measure free-run/clear input mode, even if this bit is set to "0" (external input disabled), when a capture sign al is entered from an external device, the counter value at that point in time is written into the measure register. in measure clear input mode, however, if this bit = "0" (external input disabled), the counter value is not initialized (h?ffff) upon capture and, therefore, this bit should be set to "1" (external input enabled). note: ? operation mode can only be set or changed while the counter is inactive. b0 123456b7 tio4cks tio4een tio34ens tio4m 00000000
10-83 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) clk en/cap s tclk2s s clock bus input event bus 3 2 1 0 tclk1 (p125) clk en/cap tio 5 s tclk1s s tclk2 (p126) tio 6 clk en/cap tio 7 s s s s clk en/cap tio 8 clk en/cap tio 9 s s s : selector 3 2 1 0 3 2 1 0 3 2 1 0 note:  this diagram only illustrates tio control registers and is partly omitted. figure 10.4.4 outline diagram of tio5?9 clock and enable inputs
10 10-84 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) tio5 control register (tio5cr) b bit name function r w 8?10 tio5cks 000: external input tclk1 r w tio5 clock source select bit 001: external input tclk1 010: external input tclk1 011: external input tclk1 100: clock bus 0 101: clock bus 1 110: clock bus 2 111: clock bus 3 11, 12 tio5ens 00: does not use enable/measure input source r w tio5 enable/measure input source select bit 01: does not use enable/measure input source 10: does not use enable/measure input source 11: input event bus 3 13?15 tio5m 000: single-shot output mode r w tio5 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: noise processing input mode 111: noise processing input mode note: ? operation mode can only be set or changed while the counter is inactive. b8 9 1011121314b15 tio5cks tio5ens tio5m 00000000
10-85 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) tio6 control register (tio6cr) b bit name function r w 0?2 tio6cks 000: external input tclk2 r w tio6 clock source select bit 001: external input tclk2 010: external input tclk2 011: external input tclk2 100: clock bus 0 101: clock bus 1 110: clock bus 2 111: clock bus 3 3, 4 tio6ens 00: does not use enable/measure input source r w tio6 enable/measure input source select bit 01: does not use enable/measure input source 10: input event bus 2 11: input event bus 3 5?7 tio6m 000: single-shot output mode r w tio6 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: noise processing input mode 111: noise processing input mode note: ? operation mode can only be set or changed while the counter is inactive. b0123456b7 tio6cks tio6ens tio6m 00000000
10 10-86 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) tio7 control register (tio7cr) b bit name function r w 8 no function assigned. fix to "0". 00 9, 10 tio7cks 00: clock bus 0 r w tio7 clock source select bit 01: clock bus 1 10: clock bus 2 11: clock bus 3 11, 12 tio7ens 00: does not use enable/measure input source r w tio7 enable/measure input source select bit 01: does not use enable/measure input source 10: input event bus 0 11: input event bus 3 13?15 tio7m 000: single-shot output mode r w tio7 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: noise processing input mode 111: noise processing input mode note: ? operation mode can only be set or changed while the counter is inactive. tio8 control register (tio8cr) b bit name function r w 0, 1 tio8cks 00: clock bus 0 r w tio8 clock source select bit 01: clock bus 1 10: clock bus 2 11: clock bus 3 2?4 tio8ens 000: does not use enable/measure input source r w tio8 enable/measure input source select bit 001: does not use enable/measure input source 010: does not use enable/measure input source 011: does not use enable/measure input source 100: does not use enable/measure input source 101: input event bus 1 110: input event bus 2 111: input event bus 3 5?7 tio8m 000: single-shot output mode r w tio8 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: noise processing input mode 111: noise processing input mode note: ? operation mode can only be set or changed while the counter is inactive. b8 9 1011121314b15 tio7cks tio7ens tio7m 00000000 b0123456b7 tio8cks tio8ens tio8m 00000000
10-87 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.5 tio counters (tio0ct?tio9ct) tio0 counter (tio0ct) tio1 counter (tio1ct) tio2 counter (tio2ct) tio3 counter (tio3ct) tio4 counter (tio4ct) tio5 counter (tio5ct) tio6 counter (tio6ct) tio7 counter (tio7ct) tio8 counter (tio8ct) tio9 counter (tio9ct) b bit name function r w 0?15 tio0ct?tio9ct 16-bit counter value r(note 1) note 1: protected against write during pwm output mode. note: ? these registers must always be accessed in halfwords. the tio counter is a 16-bit down-counter. after the timer is enabled (by writing to the enable bit in software or by external input), the counter starts counting synchronously with the count clock. these counters are protected against write during pwm output mode. tio9 control register (tio9cr) b bit name function r w 8 no function assigned. fix to "0". 0? 9, 10 tio9cks 00: clock bus 0 r w tio9 clock source select bit 01: clock bus 1 10: clock bus 2 11: clock bus 3 11, 12 tio9ens 00: does not use enable/measure input source r w tio9 enable/measure input source select bit 01: does not use enable/measure input source 10: input event bus 1 11: input event bus 3 13?15 tio9m 000: single-shot output mode r w tio9 operation mode select bit 001: delayed single-shot output mode 010: continuous output mode 011: pwm output mode 100: measure clear input mode 101: measure free-run input mode 110: noise processing input mode 111: noise processing input mode note: ? operation mode can only be set or changed while the counter is inactive. b8 9 1011121314b15 tio9cks tio9ens tio9m 00000000 b01234567891011121314b15 tio0ct-tio9ct ????????????????
10 10-88 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.6 tio reload 0/ measure registers (tio0rl0?tio9rl0) tio0 reload 0/ measure register (tio0rl0) tio1 reload 0/ measure register (tio1rl0) tio2 reload 0/ measure register (tio2rl0) tio3 reload 0/ measure register (tio3rl0) tio4 reload 0/ measure register (tio4rl0) tio5 reload 0/ measure register (tio5rl0) tio6 reload 0/ measure register (tio6rl0) tio7 reload 0/ measure register (tio7rl0) tio8 reload 0/ measure register (tio8rl0) tio9 reload 0/ measure register (tio9rl0) b bit name function r w 0?15 tio0rl0?tio9rl0 16-bit reload register value r(note 1) note 1: these registers are protected against write during measure input mode. note: ? these registers must always be accessed in halfwords. the tio reload 0/ measure registers serve dual purposes as a register for reloading data into the tio counter registers (tio0ct?tio9ct) and as a measure register during measure input mode. these registers are pro- tected against write during measure input mode. the content of the reload 0 register is loaded into the counter in the following cases: ? when after the counter started counting in noise processing input mode, the input signal is inverted and a valid-level signal is entered again before the counter underflows ? when the counter is enabled in single-shot output mode ? when the counter underflowed in delayed single-shot output or continuous output mode ? when the counter is enabled in pwm output mode and when the counter value set by the reload 1 register underflowed simply because data is written to the reload 0 register does not mean that the data is loaded into the counter. if this register is used as a measure register, the counter value is latched into that measure register by event input. b01234567891011121314b15 tio0rl0-tio9rl0 ????????????????
10-89 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.7 tio reload 1 registers (tio0rl1?tio9rl1) tio0 reload 1 register (tio0rl1) tio1 reload 1 register (tio1rl1) tio2 reload 1 register (tio2rl1) tio3 reload 1 register (tio3rl1) tio4 reload 1 register (tio4rl1) tio5 reload 1 register (tio5rl1) tio6 reload 1 register (tio6rl1) tio7 reload 1 register (tio7rl1) tio8 reload 1 register (tio8rl1) tio9 reload 1 register (tio9rl1) b bit name function r w 0?15 tio0rl1?tio9rl1 16-bit reload register value r w note: ? these registers must always be accessed in halfwords. the tio reload 1 registers are used to reload data into the tio counter registers (tio0ct?tio9ct). the content of the reload 1 register is loaded into the counter in the following cases: ? when the count value set by the reload 0 register underflowed in pwm output mode simply because data is written to the reload 1 register does not mean that the data is loaded into the counter. b01234567891011121314b15 tio0rl1-tio9rl1 ????????????????
10 10-90 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.8 tio enable control registers tio0-9 enable protect register (tiopro) b bit name function r w 0?5 no function assigned. fix to "0". 00 6 tio9pro (tio9 enable protect bit) 0: enable rewrite r w 7 tio8pro (tio8 enable protect bit) 1: disable rewrite 8 tio7pro (tio7 enable protect bit) 9 tio6pro (tio6 enable protect bit) 10 tio5pro (tio5 enable protect bit) 11 tio4pro (tio4 enable protect bit) 12 tio3pro (tio3 enable protect bit) 13 tio2pro (tio2 enable protect bit) 14 tio1pro (tio1 enable protect bit) 15 tio0pro (tio0 enable protect bit) note: ? this register must always be accessed in halfwords. the tio0-9 enable protect register controls rewriting of the tio count enable bit described in the next page by enabling or disabling it. tio9 tio8 tio7 tio6 tio5 tio4 tio3 tio2 tio1 tio0 pro pro pro pro pro pro pro pro pro pro 0000000000 b01234567891011121314b15 0 00000
10-91 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) wr bn tiom enable protect (tiompro) wr en-on tiom external enable (tiomeen or tiomens) tinns tiom enable (tiomcen) tio enable control input processing selection f/f f/f f/f event bus tinn figure 10.4.5 configuration of the tio enable circuit tio0-9 count enable register (tiocen) b bit name function r w 0?5 no function assigned. fix to "0". 00 6 tio9cen (tio9 count enable bit) 0: stop count r w 7 tio8cen (tio8 count enable bit) 1: enable count 8 tio7cen (tio7 count enable bit) 9 tio6cen (tio6 count enable bit) 10 tio5cen (tio5 count enable bit) 11 tio4cen (tio4 count enable bit) 12 tio3cen (tio3 count enable bit) 13 tio2cen (tio2 count enable bit) 14 tio1cen (tio1 count enable bit) 15 tio0cen (tio0 count enable bit) note: ? this register must always be accessed in halfwords the tio0-9 count enable register controls operation of the tio counters. to enable any tio counter in soft- ware, enable its corresponding enable protect bit for write and set the count enable bit by writing "1". to stop any tio counter, enable its corresponding enable protect bit for write and reset the count enable bit by writing "0". in all but continuous output mode, when the counter stops due to occurrence of an underflow, the count enable bit is automatically reset to "0". therefore, the tio0-9 count enable register when accessed for read serves as a status register indicating whether the counter is operating or idle. tio9 tio8 tio7 tio6 tio5 tio4 tio3 tio2 tio1 tio0 cen cen cen cen cen cen cen cen cen cen 0000000000 b01234567891011121314b15 0 00000
10 10-92 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.9 operation in tio measure free-run/clear input modes (1) outline of tio measure free-run/clear input modes in measure free-run/clear input modes, the timer is used to measure a duration of time from when the counter starts counting till when an external capture signal is entered. it is possible to generate an interrupt request upon underflow of the counter or execution of measurement operation and a dma transfer request (for only the ti08) upon underflow of the counter. after the timer is enabled (by writing to the enable bit in software), the counter starts counting down synchro- nously with the count clock. when a capture signal is entered from an external device, the counter value at that point in time is written into a register called the ?measure register.? in measure clear input mode, the counter value is initialized to h?ffff upon capture, from which the counter starts counting down again. when the counter underflows, it starts counting down from h'ffff. in measure free-run input mode, the counter continues counting down even after capture. the counter re- turns to h?ffff upon underflow, from which it starts counting down again. to stop the counter, disable count by writing to the enable bit in software. figure 10.4.6 typical operation in measure free-run input mode count clock counter h'ffff h'0000 enabled (by writing to the enable bit) tio interrupt request measure event (capture) occurs enable bit note:  this diagram does not show detailed timing information. measure register tin interrupt request due to external event input h'7000 h'9000 measure event (capture) tin interrupt request due to external event input tin interrupt request undefined value tio interrupt request due to underflow h'7000 undefined h'9000 tio8 dma transfer request tio8 dma transfer request due to underflow
10-93 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) (2) precautions on using tio measure free-run/clear input modes the following describes precautions to be observed when using tio measure free-run/clear input modes. ? if measure event input and write to the counter occur in the same clock period, the write value is set in the counter while at the same time latched into the measure register. figure 10.4.7 typical operation in measure clear input mode h'ffff h'0000 h'7000 h'7000 enabled (by writing to the enable bit) measure event (capture) occurs count clock counter tio interrupt request enable bit note:  this diagram does not show detailed timing information. measure register tin interrupt request undefined value tin interrupt request due to external event input undefined tio8 dma transfer request tio8 dma transfer request due to underflow tio interrupt request due to underflow
10 10-94 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.10 operation in tio noise processing input mode in noise processing input mode, the timer is used to detect that the input signal remained in the same state for over a predetermined time. in noise processing input mode, a high or low level on external input activates the counter and if the input signal remains in the same state for over a predetermined time before the counter underflows, the counter generates an interrupt request before stopping. if the valid-level signal being applied turns to an invalid level before the counter underflows, the counter temporarily stops counting and when a valid-level signal is entered again, the counter is reloaded with the initial count and restarts counting. the effective count width is (reload 0 register set value + 1). the timer stops at the same time the counter underflows or count is disabled by writing to the enable bit. furthermore, it is possible to generate an interrupt request and a dma transfer request (for only the ti08) upon underflow of the counter. figure 10.4.8 typical operation in noise processing input mode h'ffff h'0000 reload 0 register external input (noise processing) h'a000 effective signal width invalid disabled by underflow h'a000 count clock counter enabled (by writing to the enable bit) tio interrupt request enable bit note:  this diagram does not show detailed timing information. invalid tio8 dma transfer request tio8 dma transfer request due to underflow tio interrupt request due to underflow
10-95 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) count clock counter h'ffff h'0000 enabled (by writing to the enable bit or by external input) f/f output underflow (first time) tio interrupt request due to underflow enable bit note:  this diagram does not show detailed timing information. reload 0 register h'a000 underflow (second time) count down from the reload 1 register set value h'(c000-1) h'(a000-1) reload 1 register h'c000 count down from the reload 0 register set value h'a000 pwm output period h'c000 h'a000 undefined value count down from the reload 0 register set value data inverted by underflow data inverted by enable data inverted by underflow h'(a000-1) tio8 dma transfer request due to underflow figure 10.4.9 typical operation in pwm output mode 10.4.11 operation in tio pwm output mode (1) outline of tio pwm output mode in pwm output mode, the timer uses two reload registers to generate a waveform with a given duty cycle. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the initial values in the reload 0 and reload 1 registers, the counter is loaded with the reload 0 register value and starts counting down synchronously with the count clock. the first time the counter underflows, it is loaded with the content of reload 1 register and continues counting. thereafter, the counter is loaded with the reload 0 and reload 1 register values alternately each time an underflow occurs. the (reload 0 register set value + 1) and (reload 1 register set value + 1) respectively are effective as count values. the timer stops at the same time count is disabled by writing to the enable bit (and not in synchronism with pwm output period). the f/f output waveform in pwm output mode is inverted (f/f output level changes from low to high or vice versa) when the counter starts counting and each time it underflows. furthermore, it is possible to generate an interrupt request at even-numbered occurrences of underflow after the counter is enabled and a dma transfer request (for only the ti08) every time the counter underflows. note that tio?s pwm output mode does not have the count correction function.
10 10-96 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) to rewrite the reload 0 and reload 1 registers while the timer is operating, rewrite the reload 1 register first and then the reload 0 register. that way, the reload 0 and reload 1 registers both are updated synchronously with pwm period, from which the timer starts operating. this operation can normally be performed collec- tively by accessing 32-bit addresses beginning with the reload 1 register address wordwise. (data are auto- matically written to the reload 1 and then the reload 0 registers in succession.) if the reload 0 and reload 1 registers are updated in the reverse order beginning with reload 0, only the reload 0 register is updated. note also that if the reload 0 and reload 1 registers are accessed for read, the read values are always the data that have been written to the respective registers, and not the reload values being actually used. when altering pwm period by rewriting the reload registers, if the pwm period terminates before the cpu finishes writing to reload 0, the pwm period is not altered in the current session and the data written to the register is reflected in the next period. (3) precautions on using tio pwm output mode the following describes precautions to be observed when using tio pwm output mode. ? if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled. ? if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge. ? because the timer operates synchronously with the count clock, a count clock-dependent delay is in- cluded before f/f output is inverted after the timer is enabled. (2) reload register updates in tio pwm output mode in pwm output mode, when the timer remains idle, the reload 0 and reload 1 registers are updated at the same time data are written to the respective registers. but when the timer is operating, the reload 1 register is updated by updating the reload 0 register. however, if the reload 0 and reload 1 registers are accessed for read, the read values are always the data that have been written to the respective registers. internal bus tionrl1 reload 1 reload 1 wr reload 0 wr buffer 16-bit counter prescaler output f/f to tionrl0 reload 0 pwm mode control figure 10.4.10 pwm circuit diagram
10-97 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) figure 10.4.11 reload 0 and reload 1 register updates in pwm output mode (a) when reload register updates take effect in the current period (reflected in the next period) count clock reload 0 register reload 1 register h'0001 h'ffff h'1000 h'7fff h'2000 h'8000 h'9000 counter interrupt due to underflow timing at which reload 0 and reload 1 registers are updated operation by new reload value written reload 0 register reload 1 register f/f output write to reload 1 write to reload 0 (reload 1 data latched) h'1000 h'2000 h'8000 h'9000 enlarged view old pwm output period f/f output h'7ffe h'0000 pwm period latched reload 1 buffer h'2000 h'9000 new pwm output period new pwm output period note:  this diagram does not show detailed timing information. h'0001 h'ffff h'1000 h'0fff h'2000 h'8000 h'9000 (b) when reload register updates take effect in the next period (reflected one period later) operation by old reload value h'1000 h'2000 h'8000 h'9000 h'0ffe h'0000 h'2000 h'9000 write to reload 1 write to reload 0 (reload 1 data latched) old pwm output period old pwm output period old pwm output period timing at which reload 0 and reload 1 registers are updated pwm period latched count clock reload 0 register reload 1 register counter interrupt due to underflow reload 0 register reload 1 register f/f output enlarged view f/f output reload 1 buffer
10 10-98 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.12 operation in tio single-shot output mode (without correction function) (1) outline of tio single-shot output mode in single-shot output mode, the timer generates a pulse in width of (reload 0 register set value + 1) only once and then stops. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the reload 0 register, the counter is loaded with the content of the reload 0 register and starts counting synchronously with the count clock. the counter counts down and when the minimum count is reached, stops upon under- flow. the f/f output waveform in single-shot output mode is inverted (f/f output level changes from low to high or vice versa) at startup and upon underflow, generating a single-shot pulse waveform in width of (reload 0 register set value + 1) only once. furthermore, it is possible to generate an interrupt request and a dma transfer request (for only the ti08) upon underflow of the counter. the count value is (reload 0 register set value + 1). (for counting operation, see also section 10.3.9, ?opera- tion of top single-shot output mode.?) (2) precautions on using tio single-shot output mode the following describes precautions to be observed when using tio single-shot output mode. ? if the counter stops due to an underflow in the same clock period as the timer is enabled by external input, the former has priority so that the counter stops. ? if the counter stops due to an underflow in the same clock period as count is enabled by writing to the enable bit, the latter has priority so that count is enabled. ? if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled. ? because the timer operates synchronously with the count clock, a count clock-dependent delay is in- cluded before f/f output is inverted after the timer is enabled.
10-99 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) count clock h'ffff h'0000 enabled (by writing to the enable bit or by external input) f/f output disabled (by underflow) (unused) tio interrupt request due to underflow enable bit count down from the reload 0 register set value note:  this diagram does not show detailed timing information. reload 0 register h'a000 h'a000 counter reload 1 register undefined value h'(a000-1) data inverted by enable data inverted by underflow tio8 dma transfer request due to underflow figure 10.4.12 typical operation in tio single-shot output mode (without correction function)
10 10-100 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.13 operation in tio delayed single-shot output mode (without correction function) (1) outline of tio delayed single-shot output mode in delayed single-shot output mode, the timer generates a pulse in width of (reload 0 register set value + 1) after a finite time equal to (counter set value + 1) only once and then stops. when the timer is enabled (by writing to the enable bit in software or by external input) after setting the counter and reload 0 register, it starts counting down from the counter?s set value synchronously with the count clock. the first time the counter underflows, it is loaded with the reload 0 register value and continues counting down. the counter stops when it underflows next time. the f/f output waveform in delayed single-shot output mode is inverted (f/f output level changes from low to high or vice versa) when the counter underflows first time and next, generating a single-shot pulse wave- form in width of (reload 0 register set value + 1) after a finite time equal to (first set value of counter + 1) only once. furthermore, it is possible to generate an interrupt request and a dma transfer request (for only the ti08) upon the first and next underflows of the counter. the (counter set value + 1) and (reload 0 register set value + 1) are effective as count values. (for counting operation, see also section 10.3.10, ?operation of top delayed single-shot output mode.?) (2) precautions on using tio delayed single-shot output mode the following describes precautions to be observed when using tio delayed single-shot output mode. ? if the counter stops due to an underflow in the same clock period as the timer is enabled by external input, the former has priority so that the counter stops. ? if the counter stops due to an underflow in the same clock period as count is enabled by writing to the enable bit, the latter has priority so that count is enabled. ? if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled. ? if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge.
10-101 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) h'ffff h'0000 underflow (first time) count down from the counter set value h'a000 underflow (second time) h'f000 count down from the reload 0 register set value h'efff h'f000 data inverted by underflow data inverted by underflow count clock f/f output (unused) tio interrupt request due to underflow enable bit note:  this diagram does not show detailed timing information. reload 0 register counter reload 1 register enabled (by writing to the enable bit or by external input) tio8 dma transfer request due to underflow figure 10.4.13 typical operation in tio delayed single-shot output mode (without correction function)
10 10-102 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) 10.4.14 operation in tio continuous output mode (without correction function) (1) outline of tio continuous output mode in continuous output mode, the timer counts down starting from the set value of the counter and when the counter underflows, it is loaded with the reload 0 register value. thereafter, this operation is repeated each time the counter underflows, thus generating consecutive pulses whose waveform is inverted in width of (reload 0 register set value + 1). when the timer is enabled (by writing to the enable bit in software or by external input) after setting the counter and reload 0 register, it starts counting down from the counter?s set value synchronously with the count clock and when the minimum count is reached, generates an underflow. this underflow causes the counter to be loaded with the content of the reload 0 register and start counting over again. thereafter, this operation is repeated each time an underflow occurs. to stop the counter, disable count by writing to the enable bit in software. the f/f output waveform in continuous output mode is inverted (f/f output level changes from low to high or vice versa) at startup and upon underflow, generating a waveform of consecutive pulses until the timer stops counting. furthermore, it is possible to generate an interrupt request and a dma transfer request (for only the ti08) each time the counter underflows. the (counter set value + 1) and (reload 0 register set value + 1) are effective as count values. (for counting operation, see also section 10.3.11, ?operation of top continuous output mode.?) (2) precautions on using tio continuous output mode the following describes precautions to be observed when using tio continuous output mode. ? if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled. ? if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge. ? because the timer operates synchronously with the count clock, a count clock-dependent delay is in- cluded before f/f output is inverted after the timer is enabled.
10-103 10 10.4 tio (input/output-related 16-bit timer) multijunction timers 32176 group user?s manual (rev.1.01) h'ffff h'0000 h'e000 h'a000 h'e000 h'dfff h'dfff (unused) data inverted by enable data inverted by underflow data inverted by underflow count clock f/f output tio interrupt request due to underflow enable bit note:  this diagram does not show detailed timing information. reload 0 register counter reload 1 register underflow (first time) count down from the counter set value underflow (second time) count down from the reload 0 register set value enabled (by writing to the enable bit or by external input) count down from the reload 0 register set value tio8 dma transfer request due to underflow figure 10.4.14 typical operation in tio continuous output mode (without correction function)
10 10-104 multijunction timers 10.5 tms (input-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.5 tms (input-related 16-bit timer) 10.5.1 outline of tms tms (timer measure small) is an input-related 16-bit timer capable of measuring input pulses in two circuit blocks comprising a total of eight channels. the table below shows specifications of tms. figure 10.5.1 shows a block diagram of tms. table 10.5.1 specifications of tms (input-related 16-bit timer) item specification number of channels 8 channels (2 circuit blocks consisting of 4 channels each, 8 channels in total) counter 16-bit up-counter 10.5.2 outline of tms operation in tms, when the timer is enabled (by writing to the enable bit in software), the counter starts operating. the counter is a 16-bit up-counter, where the counter value is latched into each measure register when a measure signal is entered from an external device. the counter stops counting at the same time count is disabled by writing to the enable bit in software. tin and tms interrupt requests can be generated by external measure signal input and counter overflow, respec- tively (however, tms0 does not have a tin interrupt).
10 10-105 multijunction timers 10.5 tms (input-related 16-bit timer) 32176 group user?s manual (rev.1.01) clock bus input event bus 3 2 1 0 3 2 1 0 clk tms 0 s ovf cap3 cap2 cap1 cap0 s s s s tclk3 (p127) tclk3s clk tms 1 ovf cap3 cap2 cap1 cap0 s s s s s tin16s drq6 tin17s tin16 (p130) tin17 (p131) tin18s tin18 (p132) tin19s tin19 (p133) drq5 irq10 irq10 irq10 irq10 output event bu s 0 1 2 3 irq7 irq7 s : selector 3 2 1 0 3 2 1 0 0 1 2 3 measure register 3 measure register 2 measure register 1 measure register 0 counter (16-bit) figure 10.5.1 block diagram of tms (input-related 16-bit timer) ? because the timer operates synchronously with the count clock, there is a count clock-dependent delay from when the timer is enabled till when it actually starts operating. figure 10.5.2 count clock-dependent delay bclk count clock enable count clock period count clock-dependent delay write to the enable bit
10 10-106 multijunction timers 10.5 tms (input-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.5.3 tms related register map shown below is a tms related register map. tms related register map address +0 address +1 address see pages b0 b7 b8 b15 h'0080 03c0 tms0 counter 10-108 (tms0ct) h'0080 03c2 tms0 measure 3 register 10-108 (tms0mr3) h'0080 03c4 tms0 measure 2 register 10-108 (tms0mr2) h'0080 03c6 tms0 measure 1 register 10-108 (tms0mr1) h'0080 03c8 tms0 measure 0 register 10-108 (tms0mr0) h'0080 03ca tms0 control register tms1 control register 10-107 (tms0cr) (tms1cr) (use inhibited area) h'0080 03d0 tms1 counter 10-108 (tms1ct) h'0080 03d2 tms1 measure 3 register 10-108 (tms1mr3) h'0080 03d4 tms1 measure 2 register 10-108 (tms1mr2) h'0080 03d6 tms1 measure 1 register 10-108 (tms1mr1) h'0080 03d8 tms1 measure 0 register 10-108 (tms1mr0) |
10 10-107 multijunction timers 10.5 tms (input-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.5.4 tms control registers the tms control registers are used to select tms0/1 input events and count clock sources, as well as control count enable. following two tms control registers are included: ? tms0 control register (tms0cr) ? tms1 control register (tms1cr) tms0 control register (tms0cr) b bit name function r w 0 tms0ss0 0: does not use measure source r w tms0 measure 0 source select bit 1: input event bus 0 1 tms0ss1 0: does not use measure source r w tms0 measure 1 source select bit 1: input event bus 1 2 tms0ss2 0: does not use measure source r w tms0 measure 2 source select bit 1: input event bus 2 3 tms0ss3 0: does not use measure source r w tms0 measure 3 source select bit 1: input event bus 3 4, 5 tms0cks 00: external input tclk3 r w tms0 clock source select bit 01: clock bus 0 10: clock bus 1 11: clock bus 3 6 no function assigned. fix to "0". 00 7 tms0cen 0: stop count r w tms0 count enable bit 1: start count tms1 control register (tms1cr) b bit name function r w 8 tms1ss0 0: external input tin19 r w tms1 measure 0 source select bit 1: input event bus 0 9 tms1ss1 0: external input tin18 r w tms1 measure 1 source select bit 1: input event bus 1 10 tms1ss2 0: external input tin17 r w tms1 measure 2 source select bit 1: input event bus 2 11 tms1ss3 0: external input tin16 r w tms1 measure 3 source select bit 1: input event bus 3 12 no function assigned. fix to "0". 00 13 tms1cks 0: clock bus 0 r w tms1 clock source select bit 1: clock bus 3 14 no function assigned. fix to "0". 00 15 tms1cen 0: stop count r w tms1 count enable bit 1: start count b0123456b7 tms0cks tms0cen 00000000 tms0 tms0 tms0 tms0 ss0 ss1 ss2 ss3 b8 9 1011121314b15 tms1cks tms1cen 00000000 tms1 tms1 tms1 tms1 ss0 ss1 ss2 ss3
10 10-108 multijunction timers 10.5 tms (input-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.5.5 tms counters (tms0ct, tms1ct) tms0 counter (tms0ct) tms1 counter (tms1ct) b bit name function r w 0?15 tms0ct, tms1ct 16-bit counter value r w note: ? these registers must always be accessed in halfwords. the tms counter is a 16-bit up-counter, which starts counting when the timer is enabled (by writing to the enable bit in software). the counters can be read during operation. 10.5.6 tms measure registers (tms0mr3?0, tms1mr3?0) tms0 measure 3 register (tms0mr3) tms0 measure 2 register (tms0mr2) tms0 measure 1 register (tms0mr1) tms0 measure 0 register (tms0mr0) tms1 measure 3 register (tms1mr3) tms1 measure 2 register (tms1mr2) tms1 measure 1 register (tms1mr1) tms1 measure 0 register (tms1mr0) b bit name function r w 0?15 tms0mr3-tms0mr0 16-bit counter value r ? tms1mr3-tms1mr0 notes: ? this register is a read-only register. ? this register can be accessed in either byte or halfword. the tms measure registers are used to latch counter contents upon event input. the tms measure registers are a read-only register. b01234567891011121314b15 tms0ct, tms1ct ? ??????????????? b01234567891011121314b15 tms0mr3-0, tms1mr3-0 ? ???????????????
10 10-109 multijunction timers 10.5 tms (input-related 16-bit timer) 32176 group user?s manual (rev.1.01) 10.5.7 operation of tms measure input (1) outline of tms measure input in tms measure input, the timer starts counting up when it is enabled (by writing to the enable bit in soft- ware). then when event input to tms is detected while the timer is operating, the counter value is latched into measure registers 0?3. the timer stops counting at the same time count is disabled by writing to the enable bit. a tin interrupt request can be generated by measure signal input from an external device (tms1 alone has a tin interrupt. tms0 does not have a tin interrupt.) a tms interrupt request can be generated when the counter overflows. count clock counter h'ffff h'0000 enabled (by writing to the enable bit) measure event 1 occurs initial value (undefined) enable bit note 1: tms1 alone has a tin interrupt. (tms0 does not have a tin interrupt.) note:  this diagram does not show detailed timing information. measure 0 register h'8000 overflow occurs tin19 interrupt request (note 1) h'c000 measure 1 register tin18 interrupt request (note 1) measure event 0 occurs tms interrupt request due to overflow h'6000 h'd000 h'6000 h'8000 undefined value initial value (undefined) h'd000 h'c000 measure event 1 occurs measure event 0 occurs figure 10.5.3 typical operation of tms measure input (2) precautions on using tms measure input the following describes precautions to be observed when using tms measure input. ? if measure event input and write to the counter occur in the same clock period, the write value is set in the counter while at the same time latched into the measure register.
10 10-110 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) figure 10.6.1 block diagram of tml (input-related 32-bit timer) clock bus input event bus 3 2 1 0 3 2 1 0 s s s s tin20s tin21s tin20 (p134) tin21 (p135) tin22s tin22 (p136) tin23s tin23 (p137) irq11 irq11 irq11 irq11 bclk/2 output event bus 0 1 2 3 s : selector 3 2 1 0 3 2 1 0 0 1 2 3 clk tml0 cap3 cap2 cap1 cap0 measure register 3 measure register 2 measure register 1 measure register 0 counter (32-bit) s s s s s clk tml1 cap3 cap2 cap1 cap0 measure register 3 measure register 2 measure register 1 measure register 0 counter (32-bit) s drq12 ad0trg (to a-d0 converter) 10.6 tml (input-related 32-bit timer) 10.6.1 outline of tml tml (timer measure large) is an input-related 32-bit timer capable of measuring input pulses in two circuit blocks comprising a total of eight channels. the table below shows specifications of tml. figure 10.6.1 shows a block diagram of tml. table 10.6.1 specifications of tml (input-related 32-bit timer) item specification number of channels 8 channels (2 circuit blocks consisting of 4 channels each, 8 channels in total) input clock bclk/2 (10.0 mhz when f(bclk) = 20 mhz) or clock bus 1 input counter 32-bit up-counter 2 measure register 32-bit measure register 8 timer startup start counting after exiting the reset state
10 10-111 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) 10.6.2 outline of tml operation in tml, the timer starts counting upon deassertion of the reset input signal. the counter included in the timer is a 32-bit up-counter, where when a measure event signal is entered from an external device, the counter value at that point in time is stored in each 32-bit measure register. when the reset input signal is deasserted, the counter starts operating with a bclk/2, and cannot be stopped once it has started. the counter is idle only when the microcomputer remains reset. a tin interrupt request can be generated by external measure signal input (tml0 alone has a tin interrupt. tml1 does not have a tin interrupt.) however, no tml counter overflow interrupts are available. 10.6.3 tml related register map shown below is a tml related register map. tml related register map address +0 address +1 address see pages b0 b7 b8 b15 h'0080 03e0 tml0 counter (upper) 10-113 (tml0cth) h'0080 03e2 tml0 counter (lower) 10-113 (tml0ctl) (use inhibited area) h'0080 03ea (use inhibited area) tml0 control register 10-112 (tml0cr) (use inhibited area) h'0080 03f0 tml0 measure 3 register (upper) 10-114 (tml0mr3h) h'0080 03f2 tml0 measure 3 register (lower) 10-114 (tml0mr3l) h'0080 03f4 tml0 measure 2 register (upper) 10-114 (tml0mr2h) h'0080 03f6 tml0 measure 2 register (lower) 10-114 (tml0mr2l) h'0080 03f8 tml0 measure 1 register (upper) 10-114 (tml0mr1h) h'0080 03fa tml0 measure 1 register (lower) 10-114 (tml0mr1l) h'0080 03fc tml0 measure 0 register (upper) 10-114 (tml0mr0h) h'0080 03fe tml0 measure 0 register (lower) 10-114 (tml0mr0l) (use inhibited area) h'0080 0fe0 tml1 counter (upper) 10-113 (tml1cth) h'0080 0fe2 tml1 counter (lower) 10-113 (tml1ctl) (use inhibited area) h'0080 0fea (use inhibited area) tml1 control register 10-112 (tml1cr) (use inhibited area) h'0080 0ff0 tml1 measure 3 register (upper) 10-115 (tml1mr3h) h'0080 0ff2 tml1 measure 3 register (lower) 10-115 (tml1mr3l) h'0080 0ff4 tml1 measure 2 register (upper) 10-115 (tml1mr2h) h'0080 0ff6 tml1 measure 2 register (lower) 10-115 (tml1mr2l) h'0080 0ff8 tml1 measure 1 register (upper) 10-115 (tml1mr1h) h'0080 0ffa tml1 measure 1 register (lower) 10-115 (tml1mr1l) h'0080 0ffc tml1 measure 0 register (upper) 10-115 (tml1mr0h) h'0080 0ffe tml1 measure 0 register (lower) 10-115 (tml1mr0l) | | | | |
10 10-112 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) 10.6.4 tml control registers tml0 control register (tml0cr) b bit name function r w 8 tml0ss0 0: external input tin23 r w tml0 measure 0 source select bit 1: input event bus 0 9 tml0ss1 0: external input tin22 r w tml0 measure 1 source select bit 1: input event bus 1 10 tml0ss2 0: external input tin21 r w tml0 measure 2 source select bit 1: input event bus 2 11 tml0ss3 0: external input tin20 r w tml0 measure 3 source select bit 1: input event bus 3 12?14 no function assigned. fix to "0". 00 15 tml0cks (note 1) 0: bclk/2 r w tml0 clock source select bit 1: clock bus 1 note 1: the counter can only be written normally when bclk/2 is used as the clock source for the counter. if the selected clock source is not bclk/2, do not write to the counter because it cannot be written normally. tml1 control register (tml1cr) b bit name function r w 8 tml1ss0 0: does not use measure source r w tml1 measure 0 source select bit 1: input event bus 0 9 tml1ss1 0: does not use measure source r w tml1 measure 1 source select bit 1: input event bus 1 10 tml1ss2 0: does not use measure source r w tml1 measure 2 source select bit 1: input event bus 2 11 tml1ss3 0: does not use measure source r w tml1 measure 3 source select bit 1: input event bus 3 12?14 no function assigned. fix to "0". 00 15 tml1cks (note 1) 0: bclk/2 r w tml1 clock source select bit 1: clock bus 1 note 1: the counter can only be written normally when bclk/2 is used as the clock source for the counter. if the selected clock source is not bclk/2, do not write to the counter because it cannot be written normally. the tml control register is used to select tml input event and count clock. b8 9 10 11 12 13 14 b15 tml0ss0 tml0ss1 tml0ss2 tml0ss3 tml0cks 00000000 b8 9 1011121314b15 tml1ss0 tml1ss1 tml1ss2 tml1ss3 tml1cks 00000000
10 10-113 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) 10.6.5 tml counters tml0 counter (upper) (tml0cth) tml0 counter (lower) (tml0ctl) b bit name function r w 0?15 tml0cth 32-bit counter value (16 high-order bits) r w tml0ctl 32-bit counter value (16 low-order bits) note: ? this register must always be accessed wordwise (in 32 bits) beginning with the address of the tml0cth. the tml0 counter is a 32-bit up-counter, which starts counting upon deassertion of the reset input signal. the tml0cth accommodates the 16 high-order bits of the 32-bit counter, and the tml0ctl accommodates the 16 low-order bits. the counters can be read during operation. tml1 counter (upper) (tml1cth) tml1 counter (lower) (tml1ctl) b bit name function r w 0?15 tml1cth 32-bit counter value (16 high-order bits) r w tml1ctl 32-bit counter value (16 low-order bits) note: ? this register must always be accessed wordwise (in 32 bits) beginning with the address of the tml1cth. the tml1 counter is a 32-bit up-counter, which starts counting upon deassertion of the reset input signal. the tml1cth accommodates the 16 high-order bits of the 32-bit counter, and the tml1ctl accommodates the 16 low-order bits. the counters can be read during operation. b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 tml0cth (16 high-order bits) ? ??????????????? b01234567891011121314b15 tml0ctl (16 low-order bits) ? ??????????????? b01234567891011121314b15 tml1cth (16 high-order bits) ? ??????????????? b01234567891011121314b15 tml1ctl (16 low-order bits) ? ???????????????
10 10-114 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) 10.6.6 tml measure registers tml0 measure 3 register (tml0mr3h) tml0 measure 3 register (tml0mr3l) tml0 measure 2 register (tml0mr2h) tml0 measure 2 register (tml0mr2l) tml0 measure 1 register (tml0mr1h) tml0 measure 1 register (tml0mr1l) tml0 measure 0 register (tml0mr0h) tml0 measure 0 register (tml0mr0l) b bit name function r w 0?15 tml0mr3h?0h 32-bit measure register value (16 high-order bits) r ? tml0mr3l?0l 32-bit measure register value (16 low-order bits) notes: ? these registers are a read-only register. ? these registers must always be accessed wordwise (in 32 bits) beginning with the word boundary. the tml0 measure register is used to latch the counter content upon event input. the tml0 measure register consists of 32 bits, which tml0mr3h?0h and tml0mr3l?0l are 16 high-order bits and 16 low-order bits, respec- tively. the tml0 measure registers can only be read, and cannot be written to. the register must always be accessed wordwise beginning with the word boundary. b01234567891011121314b15 tml0mr3h-tml0mr0h (16 high-order bits) ? ??????????????? b01234567891011121314b15 tml0mr3l-tml0mr0l (16 low-order bits) ? ???????????????
10 10-115 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) tml1 measure 3 register (tml1mr3h) tml1 measure 3 register (tml1mr3l) tml1 measure 2 register (tml1mr2h) tml1 measure 2 register (tml1mr2l) tml1 measure 1 register (tml1mr1h) tml1 measure 1 register (tml1mr1l) tml1 measure 0 register (tml1mr0h) tml1 measure 0 register (tml1mr0l) b bit name function r w 0?15 tml1mr3h?0h 32-bit measure register value (16 high-order bits) r ? tml1mr3l?0l 32-bit measure register value (16 low-order bits) notes: ? these registers are a read-only register. ? these registers must always be accessed wordwise (in 32 bits) beginning with the word boundary. the tml1 measure register is used to latch the counter content upon event input. the tml1 measure register consists of 32 bits, which tml1mr3h?0h and tml1mr3l?0l are 16 high-order bits and 16 low-order bits, respec- tively. the tml1 measure registers can only be read, and cannot be written to. the register must always be accessed wordwise beginning with the word boundary. b01234567891011121314b15 tml1mr3h-tml1mr0h (16 high-order bits) ? ??????????????? b01234567891011121314b15 tml1mr3l-tml1mr0l (16 low-order bits) ? ???????????????
10 10-116 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) 10.6.7 operation of tml measure input (1) outline of tml measure input in tml measure input, the counter starts counting up when the reset input signal is deasserted. upon event input to measure registers 0?3, the counter value is latched into each measure register. a tin interrupt request can be generated by measure signal input from an external device (tml0 alone has a tin interrupt. tml1 does not have a tin interrupt.) however, no tml counter overflow interrupts are available. figure 10.6.2 typical operation of tml measure input count clock counter (32-bit) h'ffff ffff h'0000 0000 enabled (by deassertion of reset) undefined reset note 1: tml0 alone has a tin interrupt. (tml1 does not have a tin interrupt.) note: ? this diagram does not show detailed timing information. measure 0 register overflow occurs tin23 interrupt request (note 1) measure 1 register tin22 interrupt request (note 1) measure event 0 occurs h'8000 0000 h'c000 0000 h'8000 0000 h'6000 0000 h'6000 0000 h'd000 0000 undefined value undefined h'c000 0000 h'd000 0000 measure event 1 occurs measure event 0 occurs measure event 1 occurs
10 10-117 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) (2) precautions on using tml measure input the following describes precautions to be observed when using tml measure input. ? if measure event input and write to the counter occur in the same clock period, the write value is set in the counter, whereas the up-count value (before being rewritten) is latched into the measure register. ? if clock bus 1 is selected and any clock other than bclk/2 is used for the timer, the counter cannot be written normally. therefore, when using any clock other than bclk/2, do not write to the counter. ? if clock bus 1 is selected and any clock other than bclk/2 is used for the timer, the value captured into the measure register is one count larger the counter value. during the count clock to bclk/2 period interval, however, the captured value is exactly the counter value. the diagram below shows the relationship between counter operation and the valid data that can be cap- tured. counter b acde f abcd e  when bclk/2 is selected bclk/2 captured counter b a c  when clock bus 1 is selected bclk/2 count clock captured bcd f figure 10.6.3 mistimed counter value and the captured value
10 10-118 multijunction timers 10.6 tml (input-related 32-bit timer) 32176 group user?s manual (rev.1.01) this page is blank for reasons of layout.
chapter 11 a-d converter 11.1 outline of a-d converter 11.2 a-d converter related registers 11.3 functional description of a-d converter 11.4 inflow current bypass circuit 11.5 precautions on using a-d converter
11 11-2 a-d converter 32176 group user?s manual (rev.1.01) 11.1 outline of a-d converter the 32176 contains 10-bit resolution a-d converter of the successive approximation type. the a-d converter has 16 analog input pins (channels) ad0in0?ad0in15. in addition to performing conversion individually on each channel, the a-d converter can perform conversion successively on all of n channels (n = 1?16) as a single group. the conversion result can be read out in either 10 or 8 bits. there are following conversion and operation modes for the a-d conversion: (1) conversion modes ? a-d conversion mode : ordinary mode in which analog input voltages are converted into digital quantities. ? comparator mode (note 1) : a mode in which analog input voltage is compared with a preset comparison voltage to find only the relative magnitude of two quantities. (useful in only single operation mode) (2) operation modes ? single mode : analog input voltage on one channel is a-d converted once or comparated (note 1) with a given quantity. ? scan mode : analog input voltages on two or more selected channels (in n channel units, n = 1?16) are sequentially a-d converted. single-shot scan mode : scan operation is performed for one cycle. continuous scan mode : scan operation is repeatedly until stopped. (3) special operation modes ? forcible single mode execution during scan mode : conversion is forcibly executed in single mode (comparator mode) during scan operation. ? scan mode start after single mode execution : scan operation is started subsequently after executing conversion in single mode. ? conversion restart : a-d conversion being executed in single or scan mode is restarted. (4) sample-and-hold function the analog input voltage is sampled when starting a-d conversion, and a-d conversion is performed on the sampled voltage. this function can be enabled or disabled as necessary. (5) a-d disconnection detection assist function to suppress influences of the analog input voltage leakage from any preceding channel during scan mode operation, a function is incorporated that helps to fix the electric charge on the chopper amp capacitor to the given state (avcc or avss) before starting a-d conversion. this function provides a sure and reliable means of detecting a disconnection in the wiring patterns connecting to the analog input pins. (6) inflow current bypass circuit if an overvoltage or negative voltage is applied to any analog input channel which is currently inactive, a current flows into or out of the analog input channel currently being a-d converted via the internal circuit, causing the conversion accuracy to degrade. to solve this problem, the a-d converter incorporates a circuit that bypasses such inflow current. this circuit is always enabled. (7) conversion speed the a-d conversion and comparate speed can be selected from a total of four speeds available: slow mode (normal or double speed) and fast mode (normal or double speed). the normal speed and double speed in slow mode are compatible with the 32170 group of renesas microcomputers. 11.1 outline of a-d converter
11 11-3 a-d converter 32176 group user?s manual (rev.1.01) 11.1 outline of a-d converter (8) interrupt request and dma transfer request generation functions an a-d conversion interrupt or dma transfer request can be generated each time a-d conversion or comparate operation in single mode is completed, as well as when a single-shot scan operation or one cycle of continuous scan operation is completed. note 1: to discriminate between the comparison performed internally by the successive approximation- type a-d converter and that performed in comparator mode using the same a-d converter as a comparator, the comparison in comparator mode is referred to in this manual as ?comparate.? table 11.1.1 outlines the a-d converter and figure 11.1.1 shows block diagram of a-d converter. table 11.1.1 outline of the a-d converter item description analog input 16 channels a-d conversion method successive approximation method resolution 10 bits (conversion result can be read out in either 8 or 10 bits) absolute accuracy (note 1) when sample-and-hold disabled slow mode normal speed 2lsb conditions: ta = 25c, or normal sample-and-hold enabled double speed 2lsb avcc0 = 5.12 v, fast mode normal speed 3lsb vref0 = 5.12 v double speed 3lsb when fast sample-and-hold enabled slow mode normal speed 3lsb double speed 3lsb fast mode normal speed 3lsb double speed 8lsb conversion mo de a-d conversion mode and comparator mode operation mode single mode, single-shot scan mode and continuous scan mode conversion start trigger software start started by setting the a-d conversion start bit to "1" hardware start a-d0 converter mjt (input event bus 2), mjt (input event bus 3), mjt (output event bus 3) and mjt (tin23s) conversion speed during single mode slow mode normal speed 299bclk 14.95s (note 2) bclk: (? when sample-and-hold disabled double speed 173bclk 8.65s internal peripheral clock ? when normal sample-and-hold enabled) fast mode normal speed 131bclk 6.55s double speed 89bclk 4.45s during single mode slow mode normal speed 191bclk 9.55s (when fast sample-and-hold enabled) double speed 101bclk 5.05s fast mode normal speed 95bclk 4.75s double speed 53bclk 2.65s during comparator mode slow mode normal speed 47bclk 2.35s double speed 29bclk 1.45s fast mode normal speed 23bclk 1.15s double speed 17bclk 0.85s sample-and-hold function sample-and-hold function can be enabled or disabled as necessary. a-d disconnection influences of the analog input voltage leakage from any preceding channel during scan detection assist function mode operation are suppressed. interrupt request generated when a-d conversion or comparate operation is completed generation function generated when a single-shot scan operation or one cycle of continuous scan operation is completed dma transfer request generated when a-d conversion or comparate operation is completed generation function generated when a single-shot scan operation or one cycle of continuous scan operation is completed note 1: the conversion accuracy stipulated here refers to that of the microcomputer alone, with influences of the power supply wiring and noise on the board not taken into account. note 2: this indicates the conversion time when f(bclk) = 20 mhz (1 bclk = 50 ns).
11 11-4 a-d converter 32176 group user?s manual (rev.1.01) 11.1 outline of a-d converter figure 11.1.1 block diagram of the a-d0 converter ad0in0 ad0in1 ad0in2 ad0in3 ad0in4 ad0in5 ad0in6 ad0in7 selector interrupt request avss0 vref0 10-bit a-d successive approximation register (ad0sar) 10-bit a-d0 data register 0 10-bit a-d0 data register 1 a-d0 single mode register a-d comparate data register a-d control circuit ? mode selection  channel selection  conversion time selection  interrupt control  flag control 10-bit d-a converter comparator ad0in8 ad0in9 ad0n10 ad0in11 ad0in12 ad0in13 ad0in14 ad0in15 ad0cmp ad0dt0 ad0dt1 ad0dt2 ad0dt3 ad0dt4 ad0dt5 ad0dt6 ad0dt7 ad0dt8 ad0dt9 ad0dt10 ad0dt11 ad0dt12 ad0dt13 ad0dt14 ad0dt15 dma transfer request successive approximation-type a-d converter unit internal data bus a-d0 scan mode register ad0scm0, 1 ad0sim0, 1 avcc0 10-bit readout 8-bit readout shifter 10-bit a-d0 data register 2 10-bit a-d0 data register 3 10-bit a-d0 data register 4 10-bit a-d0 data register 5 10-bit a-d0 data register 6 10-bit a-d0 data register 7 10-bit a-d0 data register 8 10-bit a-d0 data register 9 10-bit a-d0 data register 10 10-bit a-d0 data register 11 10-bit a-d0 data register 12 10-bit a-d0 data register 13 10-bit a-d0 data register 14 10-bit a-d0 data register 15 input event bus 3 input event bus 2 output event bus 3 tin23s s s ad0ctrg1 ad0strg1 sample-and-hold control circuit
11 11-5 a-d converter 32176 group user?s manual (rev.1.01) figure 11.1.2 operation in single mode (a-d conversion) a-d conversion interrupt or dma transfer request note 1: a-d0 conversion start: software trigger started by setting the a-d0 conversion start bit to "1" hardware trigger started by input event bus 3, input event bus 2, output event bus 3 or tin23s signal input aniinn completed adidtn 10-bit a-di data register conversion starts (note 1) i=0 n=0?15 11.1.1 conversion modes the a-d converter has two conversion modes: ?a-d conversion mode? and ?comparator mode.? (1) a-d conversion mode in a-d conversion mode, the analog input voltage on a specified channel is a-d converted. in single mode, a-d conversion is performed on a channel selected by the a-d single mode register 1 analog input pin select bit. in scan mode, a-d conversion is performed on channels selected by a-d scan mode register 1 according to settings of a-d scan mode register 0. the conversion result is stored in each channel?s corresponding 10-bit a-d data register. there is also an 8- bit a-d data register for each channel, from which 8-bit a-d conversion results can be read out. an a-d conversion interrupt or dma transfer request can be generated when a-d conversion in single mode is completed, as well as when one cycle of scan loop in scan mode is completed. (2) comparator mode in comparator mode, the analog input voltage on a specified channel is ?comparated? (compared) with the succes- sive approximation register value, and the result (relative magnitude of two values) is returned to a flag. the channel to be comparated is selected using the a-d single mode register 1 analog input pin select bit. the result of comparate operation is flagged ("0" or "1") by setting the a-d comparate data register bit that corresponds to the selected channel. an a-d conversion interrupt or dma transfer request can be generated when comparate operation is completed. 11.1.2 operation modes there are two operation modes for the a-d converter: ?single mode? and ?scan mode.? when comparator mode is selected as a-d conversion mode, only single mode can be used. (1) single mode in single mode, the analog input voltage on one selected channel is a-d converted or comparated once. an a-d conversion interrupt or dma transfer request can be generated when a-d conversion or comparate operation is completed. 11.1 outline of a-d converter
11 11-6 a-d converter 32176 group user?s manual (rev.1.01) a-d conversion interrupt or dma transfer request adiin0 completed here when operating in single-shot scan mode adidt0 10-bit a-di data register conversion starts (note 1) adiin1 adiinn-1 adiinn adidt1 adidtn-1 adidtn during continuous scan mode i= 0 n=0?15 note 1: a-d0 conversion start: software trigger started by setting the a-d0 conversion start bit to "1" hardware trigger started by input event bus 3, input event bus 2, output event bus 3 or tin23s signal input figure 11.1.4 operation of a-d conversion in scan mode 11.1 outline of a-d converter figure 11.1.3 operation in single mode (comparate) (2) scan mode in scan mode, the analog input voltages from channel 0 to the channel selected by the a-d scan mode register 1 scan loop select bit (channels 0?15) are sequentially a-d converted. there are two types of scan mode: ?single-shot scan mode? in which a-d conversion is completed after performing one cycle of scan operation, and ?continuous scan mode? in which scan operation is continued until halted by setting the a-d scan mode register 0?s a-d conversion stop bit to "1". these types of scan mode are selected using a-d scan mode register 0. the channels to be scanned are selected using a-d scan mode register 1. the selected channels are scanned sequentially beginning with channel 0. an a-d conversion interrupt or dma transfer request can be generated when one cycle of scan operation is completed. a-d conversion interrupt or dma transfer request note 1: comparate operation is started by writing a comparison value to the successive approximation register (adisar) adiinn completed adicmp a-di comparate data register conversion starts (note 1) adisar a-d successive approximation register comparate result adicmp=0 (ann > adisar) adicmp=1 (ann < adisar) i=0 n=0?15
11 11-7 a-d converter 32176 group user?s manual (rev.1.01) table 11.1.2 registers in which scan mode a-d conversion results are stored scan mode register 1 selected channels selected channels a-d conversion result channel selection for single-shot scan for continuous scan storage register b'0000:0 adiin0 adiin0 10-bit a-di data register 0 (adiin0) completed adiin0 10-bit a-di data register 0 (repeated until forcibly terminated) b'0001:1 adiin0 adiin0 10-bit a-di data register 0 (adiin1) adiin1 adiin1 10-bit a-di data register 1 completed adiin0 10-bit a-di data register 0 (repeated until forcibly terminated) b'0010:2 adiin0 adiin0 10-bit a-di data register 0 (adiin2) adiin1 adiin1 10-bit a-di data register 1 adiin2 adiin2 10-bit a-di data register 2 completed adiin0 10-bit a-di data register 0 (repeated until forcibly terminated) b'0011:3 adiin0 adiin0 10-bit a-di data register 0 (adiin3) adiin1 adiin1 10-bit a-di data register 1 adiin2 adiin2 10-bit a-di data register 2 adiin3 adiin3 10-bit a-di data register 3 completed adiin0 10-bit a-di data register 0 (repeated until forcibly terminated) b'xxxx:n adiin0 adiin0 10-bit a-di data register 0 (adiinn) adiin1 adiin1 10-bit a-di data register 1 adiin2 adiin2 10-bit a-di data register 2 n 11.1 outline of a-d converter ? ? (i=0) ? ? ? ? ? ? ? ? ? ?
11 11-8 a-d converter 32176 group user?s manual (rev.1.01) 11.1.3 special operation modes (1) forcible single mode execution during scan mode in this special operation mode, single mode conversion (a-d conversion or comparate) is forcibly executed on a specified channel during scan mode operation. for a-d conversion mode, the conversion result is stored in the 10-bit a-d data register corresponding to the specified channel, whereas for comparate mode, the conversion result is stored in the 10-bit a-d comparate data register. when the a-d conversion or comparate operation on a specified channel finishes, scan mode a-d conversion is restarted from where it was canceled during scan operation. to start single mode conversion during scan mode operation in software, choose a software trigger using the a-d single mode register 0 a-d conversion start trigger select bit. then, for a-d conversion, set the said register?s a-d conversion start bit to "1". for comparate mode, write a comparison value to the a-d succes- sive approximation register (ad0sar) during scan mode operation. to start single mode conversion during scan mode operation in hardware, choose a hardware trigger using the a-d single mode register 0 a-d conversion start trigger select bit. then enter the hardware trigger selected with the said register. an a-d conversion interrupt or dma transfer request can be generated when conversion on a specified channel or one cycle of scan operation is completed. figure 11.1.5 forcible single mode execution during scan mode a-d conversion interrupt or dma transfer request adiin0 adidt0 10-bit a-di data register scan mode conversion starts adiin1 adidt1 adidt5 note 1: the canceled convert operation on channel 2 is reexecuted from the beginning. completed adiin2 adiinn adidt2 adidtn adiin5 forcible single mode execution starts (note 1) adiin2 i=0 n=0?15 11.1 outline of a-d converter
11 11-9 a-d converter 32176 group user?s manual (rev.1.01) figure 11.1.6 scan mode start after single mode execution a-d conversion interrupt or dma transfer request adiin0 adidt0 10-bit a-di data register instructed to start scan mode conversion adiin1 adidt1 adidt5 completed adiinn-1 adiinn adidtn-1 adidtn adiin5 single mode conversion starts i=0 n=0?15 (2) scan mode start after single mode execution in this special operation mode, scan operation is started subsequently after executing single mode conver- sion (a-d conversion or comparate). to start this mode in software, choose a software trigger using the a-d scan mode register 0 a-d conver- sion start trigger select bit. then set the said register?s a-d conversion start bit to "1" during single mode conversion operation. to start this mode in hardware, choose a hardware trigger using the a-d scan mode register 0 a-d conver- sion start trigger select bit. then enter the hardware trigger selected with the said register during single mode conversion operation. if a hardware trigger is selected using the a-d conversion start trigger select bit in both a-d single mode register 0 and a-d scan mode register 0 and the selected hardware triggers are entered, the a-d converter first performs single mode conversion and then scan mode conversion in succession. an a-d conversion interrupt or dma transfer request can be generated when single mode conversion on a specified channel or one cycle of scan operation is completed. 11.1 outline of a-d converter
11 11-10 a-d converter 32176 group user?s manual (rev.1.01) 11.1 outline of a-d converter (3) conversion restart in this special operation mode, operation being executed in single or scan mode is stopped in the middle and reexecuted from the beginning. when in single mode, set the a-d single mode register 0 a-d conversion start bit to "1" again or enter a hardware trigger during a-d conversion or comparate operation, and the operation being executed is re- started over again. when in scan mode, set the a-d scan mode register 0 a-d conversion start bit to "1" again or enter a hardware trigger signal during scan operation, and the channel being converted is canceled and a-d conver- sion is performed from channel 0 over again. figure 11.1.7 conversion restart during single mode operation a-d conversion interrupt or dma transfer request single mode adiin5 conversion starts adidt5 completed single mode adiin5 restarts adiin5 adiin5 10-bit a-di data register i=0 figure 11.1.8 conversion restart during scan operation a-d conversion interru p t or dma transfer re q uest adiin0 adidt0 10-bit a-di data register scan mode conversion starts adiin1 adidt1 completed adiinn-1 adiinn adidtn-1 adidtn scan mode restarts adiin2 adiin0 adidt0 adiin1 adidt1 i=0 n=0?15
11 11-11 a-d converter 32176 group user?s manual (rev.1.01) 11.1.4 a-d converter interrupt and dma transfer requests the a-d converter can generate an a-d conversion interrupt or dma transfer request each time a-d conver- sion, comparate operation, single-shot scan or one cycle of continuous scan mode is completed. the a-d single mode register 0 and a-d scan mode register 0 are used to select between a-d conversion interrupt and dma transfer requests. 11.1 outline of a-d converter figure 11.1.9 selecting between interrupt and dma transfer requests 11.1.5 sample-and-hold function the analog input voltage that was sampled immediately after a-d conversion started is held on, and a-d conver- sion is performed on that seized voltage. the a-d conversion time in ?normal? sample-and-hold mode is the same as in conventional a-d conversion mode of the 32170, etc. the a-d conversion time in ?fast? sample-and-hold mode is significantly short, allowing to obtain conversion results more quickly than ever. scan mode (when one cycle of scan is completed) single mode (when a-d conversion or comparate operation is completed) a-d conversion interrupt reques t (to the interrupt controller) dma transfer request (to the dmac) a-d scan mode register 0 interrupt/dma transfer request select bit a-d single mode register 0 interrupt/dma transfer request select bit
11 11-12 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers shown below is an a-d converter related register map. a-d converter related register map (1/2) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0080 a-d0 single mode register 0 a-d0 single mode register 1 11-14 (ad0sim0) (ad0sim1) 11-16 h'0080 0082 (use inhibited area) h'0080 0084 a-d0 scan mode register 0 a-d0 scan mode register 1 11-18 (ad0scm0) (ad0scm1) 11-20 h'0080 0086 a-d0 disconnection detection assist function control register a-d0 conversion speed control register 11-23 (ad0ddacr) (ad0cvscr) 11-22 h'0080 0088 a-d0 successive approximation register 11-27 (ad0sar) h'0080 008a a-d0 disconnection detection assist method select register 11-24 (ad0ddasel) h'0080 008c a-d0 comparate data register 11-28 (ad0cmp) h'0080 008e (use inhibited area) h'0080 0090 10-bit a-d0 data register 0 11-29 (ad0dt0) h'0080 0092 10-bit a-d0 data register 1 11-29 (ad0dt1) h'0080 0094 10-bit a-d0 data register 2 11-29 (ad0dt2) h'0080 0096 10-bit a-d0 data register 3 11-29 (ad0dt3) h'0080 0098 10-bit a-d0 data register 4 11-29 (ad0dt4) h'0080 009a 10-bit a-d0 data register 5 11-29 (ad0dt5) h'0080 009c 10-bit a-d0 data register 6 11-29 (ad0dt6) h'0080 009e 10-bit a-d0 data register 7 11-29 (ad0dt7) h'0080 00a0 10-bit a-d0 data register 8 11-29 (ad0dt8) h'0080 00a2 10-bit a-d0 data register 9 11-29 (ad0dt9) h'0080 00a4 10-bit a-d0 data register 10 11-29 (ad0dt10) h'0080 00a6 10-bit a-d0 data register 11 11-29 (ad0dt11) h'0080 00a8 10-bit a-d0 data register 12 11-29 (ad0dt12) h'0080 00aa 10-bit a-d0 data register 13 11-29 (ad0dt13) h'0080 00ac 10-bit a-d0 data register 14 11-29 (ad0dt14) h'0080 00ae 10-bit a-d0 data register 15 11-29 (ad0dt15) h'0080 00d0 (use inhibited area) 8-bit a-d0 data register 0 11-30 (ad08dt0) h'0080 00d2 (use inhibited area) 8-bit a-d0 data register 1 11-30 (ad08dt1) h'0080 00d4 (use inhibited area) 8-bit a-d0 data register 2 11-30 (ad08dt2) h'0080 00d6 (use inhibited area) 8-bit a-d0 data register 3 11-30 (ad08dt3) h'0080 00d8 (use inhibited area) 8-bit a-d0 data register 4 11-30 (ad08dt4) h'0080 00da (use inhibited area) 8-bit a-d0 data register 5 11-30 (ad08dt5) h'0080 00dc (use inhibited area) 8-bit a-d0 data register 6 11-30 (ad08dt6) 11.2 a-d converter related registers
11 11-13 a-d converter 32176 group user?s manual (rev.1.01) a-d converter related register map (2/2) address +0 address +1 address see b0 b7 b8 b15 pages h'0080 00de (use inhibited area) 8-bit a-d0 data register 7 11-30 (ad08dt7) h'0080 00e0 (use inhibited area) 8-bit a-d0 data register 8 11-30 (ad08dt8) h'0080 00e2 (use inhibited area) 8-bit a-d0 data register 9 11-30 (ad08dt9) h'0080 00e4 (use inhibited area) 8-bit a-d0 data register 10 11-30 (ad08dt10) h'0080 00e6 (use inhibited area) 8-bit a-d0 data register 11 11-30 (ad08dt11) h'0080 00e8 (use inhibited area) 8-bit a-d0 data register 12 11-30 (ad08dt12) h'0080 00ea (use inhibited area) 8-bit a-d0 data register 13 11-30 (ad08dt13) h'0080 00ec (use inhibited area) 8-bit a-d0 data register 14 11-30 (ad08dt14) h'0080 00ee (use inhibited area) 8-bit a-d0 data register 15 11-30 (ad08dt15) 11.2 a-d converter related registers
11 11-14 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.1 a-d single mode register 0 a-d0 single mode register 0 (ad0sim0) 123456b7 b0 adstrg0 adstrg1 adssel adsreq adsstt adsstp adscmp 0 000100 0 b bit name function r w 0 adstrg1 (note 1) bits 0 and 2 are used to select an a-d hardware trigger.r w a-d hardware trigger select 1 bit b0 b2 0 0 : input event bus 2 0 1 : input event bus 3 1 0 : output event bus 3 1 1 : tin23s signal 1 no function assigned. fix to "0". 00 2 adstrg0 (note 1) bits 0 and 2 are used to select an a-d hardware trigger. r w a-d hardware trigger select 0 bit (see the column for bit 0.) 3 adssel 0: software trigger r w a-d conversion start trigger select bit 1: hardware trigger (note 2) 4 adsreq 0: a-d conversion interrupt request r w a-d interrupt/dma transfer request select bit 1: dma transfer request 5 adscmp 0: a-d conversion/comparate in progress r ? a-d conversion/comparate completed bit 1: a-d conversion/comparate completed 6 adsstp 0: no operation 0 w a-d conversion stop bit 1: stop a-d conversion 7 adsstt 0: no operation 0 w a-d conversion start bit 1:start a-d conversion note 1: two bits?bit 0 (a-d hardware trigger select 1) and bit 2 (a-d hardware trigger select 0)?are used to select an a-d hard ware trigger. note 2: during comparator mode, hardware triggers, if any selected, are ignored and operation is started by a software trigger. a-d single mode register 0 is used to control operation of the a-d converter during single mode (including ?forcible single mode execution during scan mode?). (1) adstrg (a-d hardware trigger select) bits (bits 0 and 2) these bits select a hardware trigger when a-d conversion by the a-d converter is to be started in hardware. select one from the following hardware trigger sources: a-d0 converter: input event bus 2 input event bus 3 output event bus 3 tin23 edge select output the contents of these bits are ignored if a software trigger is selected by adssel (a-d conversion start trigger select bit).
11 11-15 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers (2) adssel (a-d conversion start trigger select) bit (bit 3) this bit selects whether to use a software or hardware trigger to start a-d conversion during single mode. if a software trigger is selected, a-d conversion is started by setting the adsstt (a-d conversion start) bit to "1". if a hardware trigger is selected, a-d conversion is started by the trigger source selected with the adstrg (hardware trigger select) bits. (3) adsreq (a-d interrupt request/dma transfer request select) bit (bit 4) this bit selects whether to request an a-d conversion interrupt or a dma transfer when single mode opera- tion (a-d conversion or comparate) is completed. if neither an interrupt nor a dma transfer are used, choose to request an a-d conversion interrupt and use the a-d conversion interrupt control register of the interrupt controller (icu) to mask the interrupt request, or choose to request a dma transfer and use the dma chan- nel control register to disable dma transfers to be performed upon completion of a-d conversion. (4) adscmp (a-d conversion/comparate completed) bit (bit 5) this is a read-only bit, whose value when exiting the reset state is "1". this bit is "0" when the a-d converter is performing single mode operation (a-d conversion or comparate) and is set to "1" when the operation finishes. this bit is also set to "1" when a-d conversion or comparate operation is forcibly terminated by setting the adsstp (a-d conversion stop) bit to "1" during a-d conversion or comparate operation. (5) adsstp (a-d conversion stop) bit (bit 6) setting this bit to "1" while the a-d converter is performing single mode operation (a-d conversion or comparate) causes the operation being performed to stop. manipulation of this bit is ignored while single mode operation is idle or scan mode operation is under way. operation stops immediately after writing to this bit. if the a-d successive approximation register is read after being stopped, the content read from the register is the value in the middle of conversion (not trans- ferred to the a-d data register). if the a-d conversion start bit and a-d conversion stop bit are set to "1" at the same time, the a-d conversion stop bit has priority. if this bit is set to "1" when performing single mode operation in special mode ?forcible single mode execution during scan mode,? only single mode conversion stops and scan mode operation restarts. (6) adsstt (a-d conversion start) bit (bit 7) if this bit is set to "1" when a software trigger has been selected with the adssel (a-d conversion start trigger select) bit, the a-d converter starts a-d conversion. if the a-d conversion start bit and a-d conversion stop bit are set to "1" at the same time, the a-d conversion stop bit has priority. if this bit is set to "1" again while performing single mode conversion, special operation mode ?conversion restart? is turned on, so that single mode conversion restarts. if this bit is set to "1" again while performing a-d conversion in scan mode, special operation mode ?forcible single mode execution during scan mode? is turned on, so that the channel being converted in scan mode is canceled and single mode conversion is performed. when the single mode conversion finishes, scan mode a-d conversion restarts beginning with the canceled channel.
11 11-16 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.2 a-d single mode register 1 a-d0 single mode register 1 (ad0sim1) 9 1011121314b15 b8 adsmsl adsspd adsshsl ansel 00000000 adsshspd b bit name function r w 8 adsmsl 0: a-d0 conversion mode r w a-d conversion mode select bit 1: comparator mode 9 adsspd (note 1) 0: normal speed r w a-d conversion speed select bit 1: double speed 10 adsshsl 0: disable sample-and-hold r w a-d conversion method select bit 1: enable sample-and-hold 11 adsshspd (note 2) 0: normal sample-and-hold r w a-d sample-and-hold conversion speed select bit 1: fast sample-and-hold 12?15 ansel 0000 : select adiin0 (i = 0) r w a-d analog input pin select bit 0001 : select adiin1 0010 : select adiin2 0011 : select adiin3 0100 : select adiin4 0101 : select adiin5 0110 : select adiin6 0111 : select adiin7 1000 : select adiin8 1001 : select adiin9 1010 : select adiin10 1011 : select adiin11 1100 : select adiin12 1101 : select adiin13 1110 : select adiin14 1111 : select adiin15 note 1: the a-d conversion speed is determined by a combination of adsspd, adsshsl and adsshspd bits and the a-d conversion speed control register adcvsd bit. note 2: setting of this bit is effective when the sample-and-hold function is enabled by adsshsl bit. a-d single mode register 1 is used to select operation mode, conversion speed and analog input pins when the a-d converter is operating in single mode.
11 11-17 a-d converter 32176 group user?s manual (rev.1.01) (1) adsmsl (a-d conversion mode select) bit (bit 8) this bit selects a-d conversion mode when the a-d converter is operating in single mode. setting this bit to "0" selects a-d conversion mode, and setting this bit to "1" selects comparator mode. (2) adsspd (a-d conversion speed select) bit (bit 9) this bit selects the a-d conversion speed when the a-d converter is operating in single mode. setting this bit to "0" selects normal speed, and setting this bit to "1" selects double speed. (3) adsshsl (a-d conversion method select) bit (bit 10) this bit enables or disables the sample-and-hold function when the a-d converter is operating in single mode. setting this bit to "0" disables the sample-and-hold function, and setting this bit to "1" enables the sample-and-hold function. setting of this bit has no effect if comparator mode is selected with the adsmsl (a-d conversion mode select) bit. (4) adsshspd (a-d sample-and-hold speed select) bit (bit 11) when the a-d converter?s sample-and-hold function is enabled, this bit selects a conversion speed. when this bit is "0", the conversion speed is the same as normal a-d conversion speed. when this bit is "1", conversion is performed at a speed faster than normal a-d conversion speed. setting of this bit has no effect if the sample-and-hold function is disabled by setting the adsshsl (a-d conversion method select) bit to "0". for details about the conversion time, see section 11.3.4, ?calculating the a-d conversion time.? (5) ansel (a-d analog input pin select) bits (bits 12?15) these bits select the analog input pins when the a-d converter is operating in single mode. a-d conversion or comparate operation is performed on the channels selected with these bits. if these bits are accessed for read, the value written to them is read out. 11.2 a-d converter related registers
11 11-18 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.3 a-d scan mode register 0 a-d0 scan mode register 0 (ad0scm0) b bit name function r w 0 adctrg1 (note 1) bits 0 and 2 are used to select an a-d hardware trigger.r w a-d hardware trigger select 1 bit b0 b2 0 0 : input event bus 2 0 1 : input event bus 3 1 0 : output event bus 3 1 1 : tin23s signal 1 adcmsl 0: single-shot mode r w a-d scan mode select bit 1: continuous mode 2 adctrg0 bits 0 and 2 are used to select an a-d hardware trigger. r w a-d hardware trigger select 0 bit (see the column for bit 0.) 3 adcsel 0: software trigger r w a-d conversion start trigger select bit 1: hardware trigger 4 adcreq 0: a-d conversion interrupt request r w a-d interrupt/dma transfer request select bit 1: dma transfer request 5 adccmp 0: a-d conversion in progress r ? a-d conversion completed bit 1: a-d conversion completed 6 adcstp 0: no operation 0 w a-d conversion stop bit 1: stop a-d conversion 7 adcstt 0: no operation 0 w a-d conversion start bit 1: start a-d conversion note 1: two bits?bit 0 (a-d hardware trigger select 1) and bit 2 (a-d hardware trigger select 0)?are used to select an a-d hard ware trigger. a-d scan mode register 0 is used to control operation of the a-d converter during scan mode. (1) adctrg (a-d hardware trigger select) bits (bits 0 and 2) these bits select a hardware trigger when a-d conversion by the a-d converter is to be started in hardware. select one from the following hardware trigger sources: a-d0 converter: input event bus 2 input event bus 3 output event bus 3 tin23 edge select output the contents of these bits are ignored if a software trigger is selected by adcsel (a-d conversion start trigger select bit). b0123456b7 adctrg1 a dcmsl adctrg0 adcsel adcreq adccmp adcstp adcstt 00000100
11 11-19 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers (2) adcmsl (a-d scan mode select) bit (bit 1) this bit selects scan mode of the a-d converter between single-shot scan and continuous scan. setting this bit to "0" selects single-shot scan mode, where the channels selected with the anscan (a-d scan loop select) bits are sequentially a-d converted and when a-d conversion on all selected channels is completed, the conversion operation stops. setting this bit to "1" selects continuous scan mode, where after operation in single-shot scan mode finishes, a-d conversion is reexecuted beginning with the first channel and continued until stopped by setting the adcstp (a-d conversion stop) bit to "1". (3) adcsel (a-d conversion start trigger select) bit (bit 3) this bit selects whether to use a software or hardware trigger to start a-d conversion during scan mode. if a software trigger is selected, a-d conversion is started by setting the adcstt (a-d conversion start) bit to "1". if a hardware trigger is selected, a-d conversion is started by the trigger source selected with the adctrg (hardware trigger select) bits. (4) adcreq (a-d interrupt request/dma transfer request select) bit (bit 4) this bit selects whether to request an a-d conversion interrupt or a dma transfer when one cycle of scan mode operation is completed. if neither an interrupt nor a dma transfer are used, choose to request an a-d conversion interrupt and use the a-d conversion interrupt control register of the interrupt controller (icu) to mask the interrupt request, or choose to request a dma transfer and use the dma channel control register to disable dma transfers to be performed upon completion of a-d conversion. (5) adccmp (a-d conversion completed) bit (bit 5) this is a read-only bit, whose value when exiting the reset state is "1". this bit is "0" when the a-d converter is performing scan mode a-d conversion and is set to "1" when single-shot scan mode finishes or continuous scan mode is stopped by setting the adcstp (a-d conversion stop) bit to "1". (6) adcstp (a-d conversion stop) bit (bit 6) setting this bit to "1" while the a-d converter is performing scan mode a-d conversion causes the operation being performed to stop. this bit is effective only for scan mode operation, and does not affect single mode operation even when single and scan modes both are active during special operation mode. operation stops immediately after writing to this bit, and the a-d conversion being performed on any channel is aborted in the middle, without transferring the result to the a-d data register. if the a-d conversion start bit and a-d conversion stop bit are set to "1" at the same time, the a-d conversion stop bit has priority. (7) adcstt (a-d conversion start) bit (bit 7) this bit is used to start scan mode operation of the a-d converter in software. only when a software trigger has been selected with the adcsel (a-d conversion start trigger select) bit, setting this bit to "1" causes a- d conversion to start. if the a-d conversion start bit and a-d conversion stop bit are set to "1" at the same time, the a-d conversion stop bit has priority. if this bit is set to "1" again while performing scan mode conversion, special operation mode ?conversion restart? is turned on, so that scan mode operation is restarted using the contents set by a-d scan mode registers 0 and 1. if this bit is set to "1" again while performing a-d conversion in single mode, special operation mode ?scan mode start after single mode execution? is turned on, so that scan mode operation starts subsequently after single mode has finished.
11 11-20 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.4 a-d scan mode register 1 a-d0 scan mode register 1 (ad0scm1) b bit name function r w 8 no function assigned. fix to "0". 00 9 adcspd (note 1) 0: normal speed r w a-d conversion speed select bit 1: double speed 10 adcshsl 0: disable sample-and-hold r w a-d conversion method select bit 1: enable sample-and-hold 11 adcshspd (note 2) 0: normal sample-and-hold r w a-d sample-and-hold conversion speed select bit 1: fast sample-and-hold 12?15 anscan r w a-d scan loop select bit ?b0000?1111 (channels 0?15) (i = 0) 0000: converting adiin0 0001: converting adiin1 0010: converting adiin2 0011: converting adiin3 0100: converting adiin4 0101: converting adiin5 0110: converting adiin6 0111: converting adiin7 1000: converting adiin8 1001: converting adiin9 1010: converting adiin10 1011: converting adiin11 1100: converting adiin12 1101: converting adiin13 1110: converting adiin14 1111: converting adiin15 note 1: the a-d conversion speed is determined by a combination of adcspd, adcshsl and adcshspd bits and the a-d conversion speed control register adcvsd bit. note 2: setting of this bit is effective when the sample-and-hold function is enabled by adcshsl bit. a-d scan mode register 1 is used to select operation mode, conversion speed and scan loop when the a-d converter is operating in scan mode. the channels selected with the scan loop select bit are scanned sequen- tially beginning with channel 0 (n-channel scan). b8 9 1011121314b15 adcspd adcshsl adcshspd anscan 00000000
11 11-21 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers (1) adcspd (a-d conversion speed select) bit (bit 9) this bit selects an a-d conversion speed when the a-d converter is operating in scan mode. setting this bit to "0" selects normal speed, and setting this bit to "1" selects double speed. (2) adcshsl (a-d conversion method select) bit (bit 10) this bit enables or disables the sample-and-hold function when the a-d converter is operating in scan mode. setting this bit to "0" disables the sample-and-hold function, and setting this bit to "1" enables the sample- and-hold function. (3) adcshspd (a-d sample-and-hold conversion speed select) bit (bit 11) when the a-d converter?s sample-and-hold function is enabled, this bit selects a conversion speed. when this bit is "0", the conversion speed is the same as normal a-d conversion speed. when this bit is "1", conversion is performed at a speed faster than normal a-d conversion speed. setting of this bit has no effect if the sample-and-hold function is disabled by setting the adcshsl (a-d conversion method select) bit to "0". for details about the conversion time, see section 11.3.4, ?calculating the a-d conversion time.? (4) anscan (a-d scan loop select) bits (bits 12?15) the anscan (a-d scan loop select) bits set the channels to be scanned during scan mode of the a-d converter. the anscan (a-d scan loop select) bits when accessed for read during scan operation serve as a status register indicating the channel being scanned. the value read from these bits during single mode is always b?0000. when accessed for read after scan operation in single-shot mode is completed, the value read from these bits indicates the channel whose a-d conversion has been finished last. if a-d conversion is stopped by setting a-d scan mode register 0 adcstp (a-d conversion stop) bit to "1" while executing scan mode, the value read from these bits indicates the channel whose a-d conversion has been canceled. also, if read during single mode conversion of special operation mode ?forcible single mode execution dur- ing scan mode,? the value of these bits indicates the channel whose a-d conversion has been canceled in the middle of scan.
11 11-22 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.5 a-d conversion speed control register a-d0 conversion speed control register (ad0cvscr) b bit name function r w 8?14 no function assigned. fix to "0". 00 15 adcvsd (note 1) 0: slow mode r w a-d conversion speed control bit 1: fast mode note 1: the a-d conversion speed is determined by a combination of adcvsd bit and a-d single mode register 1?s relevant bit during single mode, or a combination of adcvsd bit and a-d scan mode register 1?s relevant bit during scan mode. the a-d conversion speed control register controls the a-d conversion speed during single and scan modes of the a-d converter. the a-d conversion speed is determined in combination with a-d single mode register 1's conversion speed select bit (double/normal). b8 9 1011121314b15 adcvsd 00000000
11 11-23 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.6 a-d disconnection detection assist function control register a-d0 disconnection detection assist function control register (ad0ddacr) 123456b7 b0 adddaen 0 0 0 0 0 0 0 0 b bit name function r w 0?6 no function assigned. fix to "0". 00 7 adddaen (note 1) 0: dis able a-d disconnection detection assist function r w a-d disconnection detection assist function enable bit 1: enable a-d disconnection detection assist function note 1: for the a-d disconnection detection assist function to be enabled, the conversion start state (discharge or precharge) must be set using the a-d disconnection detection assist method select register after setting the adddaen bit to "1". the a-d disconnection detection assist function control register is used to enable or disable the content of the a-d disconnection detection assist method select register. note: ? if any analog input wiring is disconnected, the conversion result varies depending on the circuits fitted external to the chip. this function must be fully evaluated in the actual application system before it can be used.
11 11-24 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.7 a-d disconnection detection assist method select register a-d0 disconnection detection assist method select register (ad0ddasel) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 addda sel0 addda sel1 addda sel2 addda sel3 addda sel4 addda sel6 addda sel7 addda sel8 addda sel9 addda sel10 addda sel11 addda sel12 addda sel13 addda sel14 addda sel15 addda sel5 ???????????????? b bit name function r w 0 adddasel0 0: discharge before conversion r w channel 0 disconnection detection assist method select bit 1: precharge before conversion 1 adddasel1 channel 1 disconnection detection assist method select bit 2 adddasel2 channel 2 disconnection detection assist method select bit 3 adddasel3 channel 3 disconnection detection assist method select bit 4 adddasel4 channel 4 disconnection detection assist method select bit 5 adddasel5 channel 5 disconnection detection assist method select bit 6 adddasel6 channel 6 disconnection detection assist method select bit 7 adddasel7 channel 7 disconnection detection assist method select bit 8 adddasel8 channel 8 disconnection detection assist method select bit 9 adddasel9 channel 9 disconnection detection assist method select bit 10 adddasel10 channel 10 disconnection detection assist method select bit 11 adddasel11 channel 11 disconnection detection assist method select bit 12 adddasel12 channel 12 disconnection detection assist method select bit 13 adddasel13 channel 13 disconnection detection assist method select bit 14 adddasel14 channel 14 disconnection detection assist method select bit 15 adddasel15 channel 15 disconnection detection assist method select bit notes: ? this register must always be accessed in halfwords. ? for these bits to be enabled, the adddaen bit (a-d disconnection detection assist function control register bit 7) must be set to "1" before setting these bits. in order to prevent the a-d conversion result from being affected by the analog input voltage leakage from any preceding channel, the a-d disconnection detection assist method select register is used to control the con- version start state by selecting whether to discharge or precharge the chopper amp capacitor before starting regular conversion operation.
11 11-25 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers figure 11.2.1 shows an example of a-d disconnection detection assist method in which the conversion start state is set to the avcc side (i.e., precharge before conversion is selected). figure 11.2.2 shows an example of a-d disconnection detection assist method in which the conversion start state is set to the avss side (i.e., discharge before conversion is selected). figure 11.2.1 example of a-d disconnection detection on avcc side (precharge before conversion selected) figure 11.2.2 example of a-d disconnection detection on avss side (discharge before conversion selected) analog input adiinn precharge broken wire r c precharge control signal chopper amp capacitor discharge control signal typical external circuit (note 1) on off note 1: in case of broken wire, the conversion result varies with external circuits. therefore, careful evaluation is re q uired before this function can be used. adddaen analog input adiinn discharge broken wire r c precharge control signal chopper amp capacitor discharge control signal typical external circuit (note 1) off on note 1: in case of broken wire, the conversion result varies with external circuits. therefore, careful evaluation is re q uired before this function can be used. adddaen
11 11-26 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers disconnection detection voltage (without sample-and-hold) 0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 20 40 60 80 100 120 a-d conversion c y cle [khz] voltage on disconnected port [mv] scan mode: disconnection detection enabled scan mode: disconnection detection disabled 2900 3100 3300 3500 3700 3900 4100 4300 4500 4700 4900 5100 0 20 40 60 80 100 120 a-d conversion c y cle [khz] voltage on disconnected port [mv] scan mode: disconnection detection enabled scan mode: disconnection detection disabled disconnection detection voltage (without sample-and-hold) figure 11.2.3 a-d disconnection detection assist data (when discharge before conversion selected) figure 11.2.4 a-d disconnection detection assist data (when precharge before conversion selected)
11 11-27 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.8 a-d successive approximation register a-d0 successive approximation register(ad0sar) b bit name function r w 0?5 no function assigned. fix to "0". 00 6?15 adsar ? a-d successive approximation value (a-d conversion mode) rw a-d successive approximation value/comparison value ? comparison value (comparator mode) note: ? this register must always be accessed in halfwords. the a-d successive approximation register (adsar) is used to read the conversion result of the a-d con- verter when operating in a-d conversion mode or write a comparison value when operating in comparator mode. in a-d conversion mode, the successive approximation method is used to perform a-d conversion. with this method, the reference voltage vref and analog input voltages are sequentially compared bitwise beginning with the high-order bit, and the comparison result is set in the a-d successive approximation register (adsar) bits 6?15. when the a-d conversion has finished, the value of this register is transferred to the 10-bit a-d data register (addtn) corresponding to each converted channel. when this register is accessed for read in the middle of a-d conversion, the value read from the register indicates the intermediate result of conversion. in comparator mode, this register is used to write a comparison value (the voltage with which to ?comparate?). simultaneously with a write to this register, the a-d converter starts comparing the voltage on the analog input pin selected with a-d single mode register 1 and the value written in this register. after comparate operation, the result is stored in the a-d comparate data register (adcmp). use the calculation formula shown below to find the comparison value to be written to the a-d successive approximation register (adsar) during comparator mode. comparison value = h?3ff x comparate comparison voltage [v] vref input voltage [v] b01234567891011121314b15 adsar 0 00000??????????
11 11-28 a-d converter 32176 group user?s manual (rev.1.01) 11.2 a-d converter related registers 11.2.9 a-d comparate data register a-d0 comparate data register (ad0cmp) < address: h?0080 008c> b01234567891011121314b15 ad cmp0 ad cmp1 ad cmp2 ad cmp3 ad cmp4 ad cmp6 ad cmp7 ad cmp8 ad cmp9 ad cmp10 ad cmp11 ad cmp12 ad cmp13 ad cmp14 ad cmp15 ad cmp5 ???????????????? b bit name function r w 0?15 adcmp0?adcmp15 (note 1) 0: analog input voltage > comparison voltage r ? a-d comparate result flag 1: analog input voltage < comparison voltage note 1: during comparator mode, the bits in this register correspond one for one to channels 0?15. note: ? this register must always be accessed in halfwords. when comparator mode is selected using the a-d single mode register 1 adsmsl (a-d conversion mode select) bit, the selected analog input voltage is compared with the value written to the a-d successive approxi- mation register and the result is stored in the corresponding bit of this comparate data register. the bit or flag in this register is "0" when analog input voltage > comparison voltage, or "1" when analog input voltage < comparison voltage.
11 11-29 a-d converter 32176 group user?s manual (rev.1.01) 11.2.10 10-bit a-d data registers 10-bit a-d0 data register 0(ad0dt0) 10-bit a-d0 data register 1(ad0dt1) 10-bit a-d0 data register 2(ad0dt2) 10-bit a-d0 data register 3(ad0dt3) 10-bit a-d0 data register 4(ad0dt4) 10-bit a-d0 data register 5(ad0dt5) 10-bit a-d0 data register 6(ad0dt6) 10-bit a-d0 data register 7(ad0dt7) 10-bit a-d0 data register 8(ad0dt8) 10-bit a-d0 data register 9(ad0dt9) 10-bit a-d0 data register 10(ad0dt10) 10-bit a-d0 data register 11(ad0dt11) 10-bit a-d0 data register 12(ad0dt12) 10-bit a-d0 data register 13(ad0dt13) 10-bit a-d0 data register 14(ad0dt14) 10-bit a-d0 data register 15(ad0dt15) b01234567891011121314b15 ad0dt0-ad0dt15 000000?????????? b bit name function r w 0?5 no function assigned. 0? 6?15 ad0dt0-ad0dt15 10-bit a-d conversion result r ? 10-bit a-d data note: ? these registers must always be accessed in halfwords. during single mode, the 10-bit a-d data registers are used to store the result of a-d conversion performed on each corresponding channel. during single-shot or continuous scan mode, the content of the a-d successive approximation register is transferred to the 10-bit a-d data register for the corresponding channel when a-d conversion on each channel has finished. each 10-bit a-d data register retains the last conversion result until they receive the next conver- sion result transferred, allowing the content to be read out at any time. 11.2 a-d converter related registers
11 11-30 a-d converter 32176 group user?s manual (rev.1.01) 11.2.11 8-bit a-d data registers 8-bit a-d0 data register 0(ad08dt0) 8-bit a-d0 data register 1(ad08dt1) 8-bit a-d0 data register 2(ad08dt2) 8-bit a-d0 data register 3(ad08dt3) 8-bit a-d0 data register 4(ad08dt4) 8-bit a-d0 data register 5(ad08dt5) 8-bit a-d0 data register 6(ad08dt6) 8-bit a-d0 data register 7(ad08dt7) 8-bit a-d0 data register 8(ad08dt8) 8-bit a-d0 data register 9(ad08dt9) 8-bit a-d0 data register 10(ad08dt10) 8-bit a-d0 data register 11(ad08dt11) 8-bit a-d0 data register 12(ad08dt12) 8-bit a-d0 data register 13(ad08dt13) 8-bit a-d0 data register 14(ad08dt14) 8-bit a-d0 data register 15(ad08dt15) b bit name function r w 8?15 ad08dt0-ad08dt15 8-bit a-d conversion result r ? 8-bit a-d data the a-d data register is used to store the 8-bit conversion data for the a-d converter. during single mode, the 8-bit a-d data registers store the result of a-d conversion performed on each corre- sponding channel. during single-shot or continuous scan mode, the content of the a-d successive approximation register is transferred to the 8-bit a-d data register for the corresponding channel when a-d conversion on each channel has finished. each 8-bit a-d data register retains the last conversion result until they receive the next conver- sion result transferred, allowing the content to be read out at any time. b8 9 1011121314b15 ad08dt0-ad08dt15 ???????? 11.2 a-d converter related registers
11 11-31 a-d converter 32176 group user?s manual (rev.1.01) 11.3 functional description of a-d converter 11.3.1 how to find analog input voltages the a-d converter performs a-d conversion using a 10-bit successive approximation method. the equation shown below is used to calculate the actual analog input voltage from the digital value obtained by executing a- d conversion. analog input voltage [v] = a-d conversion result x vref input voltage [v] 1,024 the a-d converter is a 10-bit converter, providing a resolution of 1,024 discrete voltage levels. because the reference voltage for the a-d converter is the voltage applied to the vref pin, make sure that an exact and stable constant-voltage power supply is connected to vref. also make sure the analog circuit power supply and ground (avcc, avss) are separated from those of the digital circuit, with sufficient noise prevention mea- sures incorporated. for details about the conversion accuracy, see section 11.3.5, ?accuracy of a-d conversion.? 11.3 functional description of a-d converter figure 11.3.1 outline block diagram of the successive approximation-type a-d converter unit adiin0 adiin1 adiin2 adiin3 adiin4 adiin5 adiin6 adiin7 selector avssi vrefi 10-bit a-di successive approximation register (adisar) 10-bit a-di data register a-di comparate data register a-d control circuit 10-bit d-a converter comparator adiin8 adiin9 a diin10 a diin11 a diin12 a diin13 a diin14 a diin15 adicmp adidt0?15 successive approximation-type a-d converter unit avcci vref vin sample-and-hold control circuit i=0
11 11-32 a-d converter 32176 group user?s manual (rev.1.01) 11.3.2 a-d conversion by successive approximation method the a-d converter use an a-d conversion start trigger (software or hardware) as they start a-d conversion. once a-d conversion begins, the following operation is automatically performed. 1. during single mode, a-d single mode register 0?s a-d conversion/comparate completion bit is cleared to "0". during scan mode, a-d scan mode register 0?s a-d conversion completion bit is cleared to "0". 2. the content of the a-d successive approximation register is cleared to h?0000. 3. the a-d successive approximation register?s most significant bit (bit 6) is set to "1". 4. the comparison voltage, vref (note 1), is fed from the d-a converter into the comparator. 5. the comparison voltage, vref, and the analog input voltage, vin, are compared, and the comparison result will be stored in bit 6. if vref < vin, then bit 6 = "1" if vref > vin, then bit 6 = "0" 6. operations in 3 through 5 above are executed for all other bits from bit 7 to bit 15. 7. the value stored in the a-d successive approximation register by the time comparison for bit 15 has finished is held in it as the a-d conversion result. 11.3 functional description of a-d converter 1st comparison b6 7 8 9 1011 121314b15 100000 000 0 n9 1 0 0 0 0 0 0 0 0 n9n81000 000 0 n9 n8 n7 n6 n5 n4 n3 n2 n1 1 2nd comparison 3rd comparison 1 0th comparison conversion completed n9 n8 n7 n6 n5 n4 n3 n2 n1 n0 result of 1st comparison result of 2nd comparison if vref > vin, then nx = 0 if vref < vin, then nx = 1 a-d successive approximation register (adisar) i = 0 figure 11.3.2 changes of the a-d successive approximation register during a-d convert operation note 1: the comparison voltage, vref (the voltage fed from the d-a converter into the comparator), is determined according to changes of the a-d successive approximation register content. shown below are the equations used to calculate the comparison voltage, vref. ? if the a-d successive approximation register content = 0 vref [v] = 0 ? if the a-d successive approximation register content = 1 to 1,023 vref [v] = (reference voltage vref / 1,024)
11 11-33 a-d converter 32176 group user?s manual (rev.1.01) 11.3 functional description of a-d converter the conversion result is stored in the 10-bit a-d data register (ad0dtn) corresponding to each converted channel. there is also an 8-bit a-d data register (ad08dtn) for each channel, from which the 8 high-order bits of the 10-bit a-d conversion result can be read out. the following shows the procedure for a-d conversion by a successive approximation method in each operation mode. (1) single mode the convert operation stops when comparison for the a-d successive approximation register bit 15 is completed. the content (a-d conversion result) of the a-d successive approximation register is transferred to the 10-bit a-d data registers 0?15 for the converted channel. (2) single-shot scan mode when comparison for the a-d successive approximation register bit 15 on a specified channel is completed, the content of the a-d successive approximation register is transferred to the corresponding 10-bit a-d data regis- ters 0?15, and the convert operations in steps 2 to 7 above are reexecuted for the next channel to be converted. in single-shot scan mode, the convert operation stops when a-d conversion in one specified scan loop is completed. (3) continuous scan mode when comparison for the a-d successive approximation register bit 15 on a specified channel is completed, the content of the a-d successive approximation register is transferred to the corresponding 10-bit a-d data regis- ters 0?15, and the convert operations in steps 2 to 7 above are reexecuted for the next channel to be converted. in continuous scan mode, the convert operation is executed continuously until scan operation is forcibly termi- nated by setting the a-d conversion stop bit (scan mode register 0 bit 6) to "1". 11.3.3 comparator operation when comparator mode (single mode only) is selected, the a-d converter functions as a comparator which compares analog input voltages with the comparison voltage that is set by software. when a comparison value is written to the successive approximation register, the a-d converter starts ?comparating? the analog input voltage selected by the single mode register 1 analog input select bit with the value written into the successive approximation register. once comparate begins, the following operation is automatically executed. 1. the a-d single mode register 0 a-d conversion/comparate completion bit is cleared to "0". 2. the comparison voltage, vref (note 1), is fed from the d-a converter into the comparator. 3. the comparison voltage, vref, and the analog input voltage, vin, are compared, and the comparison result will be stored in the comparate result flag for the corresponding channel. if vref < vin, then the comparate result flag = 0 if vref > vin, then the comparate result flag = 1 4. the comparate operation is stopped after storing the comparison result. the comparison result is stored in the a-d comparate data register (ad0cmp)?s corresponding bit. note 1: the comparison voltage, vref (the voltage fed from the d-a converter into the comparator), is determined according to changes of the a-d successive approximation register content. shown below are the equations used to calculate the comparison voltage, vref. ? if the a-d successive approximation register content = 0 vref [v] = 0 ? if the a-d successive approximation register content = 1 to 1,023 vref [v] = (reference voltage vref0 / 1,024) x (a-d0 successive approximation register content ? 0.5)
11 11-34 a-d converter 32176 group user?s manual (rev.1.01) 11.3 functional description of a-d converter 11.3.4 calculating the a-d conversion time the a-d conversion time is expressed by the sum of dummy cycle time and actual execution cycle time. the following shows each time factor necessary to calculate the conversion time. 1. start dummy time a time from when the cpu executed the a-d conversion start instruction to when the a-d converter starts a-d conversion 2. a-d conversion execution cycle time if sample-and-hold is enabled, the sampling time is included in this execution cycle time. 3. comparate execution cycle time 4. end dummy time a time from when the a-d converter has finished a-d conversion to when the cpu can stably read out the conversion result from the a-d data register. 5. scan to scan dummy time a time during single-shot or continuous scan mode from when the a-d converter has finished a-d conversion on a channel to when it starts a-d conversion on the next channel. the equation to calculate the a-d conversion time is as follows: a-d conversion time = start dummy time + execution cycle time (+ scan to scan dummy time + execution cycle time + scan to scan dummy time + execution cycle time + scan to scan dummy time .... + execution cycle time) + end dummy time note: ? enclosed in ( ) are the conversion time required for the second and subsequent channels to be converted in scan mode. (1) calculating the conversion time during a-d conversion mode the following schematically shows the method for calculating the conversion time during a-d conversion mode. start dummy execution cycle a-d conversion start trigger convert operation starts transferred to the a-d data register end dummy start dummy execution cycle execution cycle completed execution cycle end dummy scan to scan dummy scan to scan dummy (channel 0) (channel 1) (last channel) figure 11.3.3 conceptual diagram of a-d conversion time
11 11-35 a-d converter 32176 group user?s manual (rev.1.01) 11.3 functional description of a-d converter table 11.3.1 conversion clock periods in a-d conversion mode unit: bclk conversion speed start dummy (note 1) execution cycle end dummy scan to scan dummy (note 2) slow mode normal speed 4 294 1 4 double speed 4 168 1 4 fast mode normal speed 4 126 1 4 double speed 4 84 1 4 note 1: the same applies to both software and hardware triggers. note 2: only during scan operation, execution time per channel is added. (2) calculating the conversion time when sample-and-hold is enabled the following schematically shows the method for calculating the conversion time when the sample-and-hold function is enabled. start dummy execution cycle a-d conversion start trigger convert operation starts end dummy completed sampling time figure 11.3.4 conceptual diagram of a-d conversion time when sample-and-hold is enabled table 11.3.2 conversion clock periods during normal sample-and-hold mode unit: bclk conversion speed start dummy (note 1) execution cycle end dummy scan to scan dummy (note 2) slow mode normal speed 4 294 1 4 double speed 4 168 1 4 fast mode normal speed 4 126 1 4 double speed 4 84 1 4 note 1: the same applies to both software and hardware triggers. note 2: only during scan operation, execution time per channel is added. table 11.3.3 conversion clock periods during fast sample-and-hold mode unit: bclk conversion speed start dummy (note 1) execution cycle end dummy scan to scan dummy (note 2) slow mode normal speed 4 186 1 4 double speed 4 96 1 4 fast mode normal speed 4 90 1 4 double speed 4 48 1 4 note 1: the same applies to both software and hardware triggers. note 2: only during scan operation, execution time per channel is added.
11 11-36 a-d converter 32176 group user?s manual (rev.1.01) start dummy execution cycle a-d conversion start trigger convert operation starts transferred to the comparate data register end dummy completed 11.3 functional description of a-d converter figure 11.3.5 conceptual diagram of a-d conversion time during comparator mode table 11.3.4 conversion clock periods during comparator mode unit: bclk conversion speed start dummy execution cycle end dummy slow mode normal speed 4 42 1 double speed 4 24 1 fast mode normal speed 4 18 1 double speed 4 12 1 (4) a-d conversion time a total a-d conversion time in various modes are shown in the table below. table 11.3.5 a-d conversion time (total time) unit: bclk conversion start method conversion speed conversion mode (note 1) conversion time when fast sample- and-hold enabled software and normal speed single mode 299 191 hardware triggers n-channel single-shot scan/ (298 (3) calculating the conversion time during comparator mode the following schematically shows the method for calculating the conversion time during comparator mode.
11 11-37 a-d converter 32176 group user?s manual (rev.1.01) 11.3.5 accuracy of a-d conversion the accuracy of the a-d converter is indicated by an absolute accuracy. the absolute accuracy refers to a difference expressed by lsb between the output code obtained by a-d converting the analog input voltages and the output code expected for an a-d converter with ideal characteristics. the analog input voltages used during accuracy measurement are the midpoint values of the voltage width in which an a-d converter with ideal char- acteristics produces the same output code. if vref = 5.12 v, for example, the width of 1 lsb for a 10-bit a-d converter is 5 mv, so that 0 mv, 5 mv, 10 mv, 15 mv, 20 mv, 25 mv and so on are selected as midpoints of the analog input voltage. if an a-d converter is said to have the absolute accuracy of 2 lsb, it means that if the input voltage is 25 mv, for example, the output code expected for an a-d converter with ideal characteristics is h?005, and the actual a- d conversion result is in the range of h?003 to h?007. note that the absolute accuracy includes zero and full- scale errors. when actually using the a-d converter, the analog input voltages are in the range of avss to vref. note, however, that low vref voltages result in a poor resolution. note also that output codes for the analog input voltages from vref to avcc are always h?3ff. h'000 h'001 h'002 h'003 h'3fe h'3ff a-d conv ersion res ult (hexade cimal) analog input voltage [v] vref 1024 1 ideal a-d conversion characteristics a-d conversion characteristics with infinite resolution 0 vref 1024 2 vref 1024 3 vref 1024 1022 vref 1024 1023 vref 1024 1024 figure 11.3.6 ideal a-d conversion characteristics relative to the 10-bit a-d converter?s analog input voltages 11.3 functional description of a-d converter
11 11-38 a-d converter 32176 group user?s manual (rev.1.01) 11.3 functional description of a-d converter h'000 h'001 h'002 h'003 h'004 h'005 h'006 output code (he xadecimal) 0 analog input voltage [mv] ideal a-d conversion characteristics a-d conversion characteristics with infinite resolution 5 10152025303540455055 h'007 h'008 h'009 h'00a h'00b +2 lsb -2 lsb figure 11.3.7 absolute accuracy of a-d converter
11 11-39 a-d converter 32176 group user?s manual (rev.1.01) 11.4 inflow current bypass circuit 11.4 inflow current bypass circuit if when the a-d converter is a-d converting a selected analog input an overvoltage exceeding the converter?s absolute maximum rating is applied to any unselected analog input, the selector for the unselected analog input is inadvertently turned on by that overvoltage. this causes current to leak to the selected analog input, and the accuracy of the a-d conversion result is thereby deteriorated. the inflow current bypass circuit fixes the internal signals of unselected analog inputs to the gnd level, so that when an overvoltage is applied, this circuit lets the current flow into the gnd and prevents it from leaking to the selected analog input. that way, the accuracy of the a-d conversion result is prevented from being deteriorated by overvoltages. this circuit is always active while the a-d converter is operating, and does not need to be controlled in software. unselected channel selected channel to the internal logic of the a-d converte r off on off on on off fixed to gnd level external input latched into assist circuit figure 11.4.1 configuration of the inflow current bypass circuit figure 11.4.2 example of an inflow current bypass circuit where vcce + 0.7 v or more is applied unselected channel selected channel to the internal logic of the a-d converte r off on off on on off assist circuit vcce + 0.7 v or more leakage current generated sensor input leakage current generated unaffected by leakage
11 11-40 a-d converter 32176 group user?s manual (rev.1.01) 11.4 inflow current bypass circuit figure 11.4.3 example of an inflow current bypass circuit where gnd ? 0.7 v or less is applied table 11.4.1 accuracy errors (actual performance values) when current is injected into ad0in0 note 1: the conversion accuracy is not affected unless the injection current is greater than 1 ma. unselected channel selected channel to the internal logic of the a-d converte r off on off on on off assist circuit gnd - 0.7v or less leakage current generated sensor input unaffected by leakage leakage current generated ad 0 in 0 ad 0 in 1 ad 0 in 2 ad 0 in 3 ad 0 in 4 ad 0 in 5 ad 0 in 6 10ma 000000 9ma 000000 8ma 000000 7ma 000000 6ma 000000 5ma 000000 4ma 000000 3ma 000000 2ma 000000 1ma 000000 0ma 000000 -1ma 000000 -2ma -100000 -3ma -100000 -4ma -100000 -5ma -2-10000 -6ma -3-10000 -7ma -3-10000 -8ma -3-10000 -9ma -4-10000 -10ma -5-10000 analog input pin injection current (note 1) ad0in7 ad0in8 ad0in9 ad0in10 ad0in11 ad0in12 ad0in13 ad0in14 ad0in15 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 000000000 accuracy error on overcurrent injected ports (unit: lsb)
11 11-41 a-d converter 32176 group user?s manual (rev.1.01) figure 11.5.1 internal equivalent circuit of the analog input part 11.5 precautions on using a-d converter ? forcible termination during scan operation if a-d conversion is forcibly terminated by setting the a-d conversion stop bit (ad0cstp) to "1" during scan mode operation and the a-d data register for the channel that was in the middle of conversion is accessed for read, the read value shows the last conversion result that had been transferred to the data register before the conversion was forcibly terminated. ? modification of the a-d converter related registers if the content of any register?a-d conversion interrupt control register, single or scan mode registers or a-d successive approximation register, except the a-d conversion stop bit?is modified in the middle of a-d conver- sion, the conversion result cannot be guaranteed. therefore, do not modify the contents of these registers while a- d conversion is in progress, or be sure to restart a-d conversion if register contents have been modified. ? handling of analog input signals when using the a-d converter with its sample-and-hold function disabled, make sure the analog input level is fixed during a-d conversion. ? a-d conversion completed bit read timing to read the a-d conversion completed bit (single mode register 0 bit 5 or scan mode register 0 bit 5) immediately after a-d conversion has started, be sure to adjust the timing 2 bclk periods by, for example, inserting a nop instruction before read. ? regarding the analog input pins figure 11.5.1 shows the internal equivalent circuit of the a-d converter?s analog input part. to obtain accurate a-d conversion results, make sure the internal capacitor c2 of the a-d conversion circuit is charged up within a predetermined time (sampling time). to meet this sampling time requirement, it is recommended that a stabiliz- ing capacitor c1 be connected external to the chip. the method for determining the necessary value of this external stabilizing capacitor with respect to the output impedance of an analog output device is described below. also, an explanation is made of the case where the output impedance of an analog output device is low and the external stabilizing capacitor c1 is unnecessary. ? rated value of the absolute accuracy the rated value of the absolute accuracy is the actual performance value of the microcomputer alone, with influences of the power supply wiring and noise on the board not taken into account. when designing the application system, use caution for the board layout by, for example, separating the analog circuit power supply and ground (avcc0, avss0 and vref0) from those of the digital circuit and incorporating measures to prevent the analog input pins from being affected by noise, etc. from other digital signals. 11.5 precautions on using a-d converter comparator inside the microcomputer 10-bit a-d successive approximation register (adisar) 10-bit d-a converter vref v2 c2 cin : in p ut p in ca p acitance (a pp rox. 10 p f) r2 : parasitic resistance of the selector (1-2 k ? ) c2 : comparator capacitance (approx. 2.9 pf) selector r2 i i1 i2 adin n c1 e r1 c1 : parasitic capacitance of the board + stabilizing capacitance r1 : resistance of analog output device analog output device cin e : voltage of analog output device v2 : voltage across c2 vref : analog reference voltage
11 11-42 a-d converter 32176 group user?s manual (rev.1.01) thus, for a 10-bit resolution a-d converter where c2 = 2.9 pf, c1 is 0.06 f or more. use this value for reference when setting up c1. (b) maximum value of the output impedance r1 when c1 is not added if the external capacitor c1 in figure 11.5.1 is not used, examination must be made to see if the analog output device can fully charge c2 within a predetermined time. first, the equation to find i2 when c1 in figure 11.5.1 does not exist is shown below. i2 = c2(e - v2) 11.5 precautions on using a-d converter (a) example for calculating the external stabilizing capacitor c1 (addition of this capacitor is recommended) assuming the r1 in figure 11.5.1 is infinitely large and that the current necessary to charge the internal capacitor c2 is supplied from c1, if the potential fluctuation, vp, caused by capacitance division of c1 and c2 is to be within 0.1 lsb, then what amount of capacitance c1 should have. for a 10-bit a-d converter where vref is 5.12 v, 1 lsb determination voltage = 5.12 v / 1,024 = 5 mv. the potential fluctuation of 0.1 lsb means a 0.5 mv fluctuation. vp is also obtained by the equation below: the relationship between the capacitance division of c1 and c2 and the potential fluctuation, vp, is obtained by the equation below: c2 c1 + c2 vp = (e - v2) eq. a-1 1 2 vp = vp1 < eq. a-2 i vref 10 2 x - 1  i = 0 where vp1 = potential fluctuation in the first a-d conversion performed and x = 10 for a 10-bit resolution a-d converter when eq. a-1 and eq. a-2 are solved, the following results: e - v2 vp1 c1 = c2 { - 1 } eq. a-3 1 2  c1 > c2 {10 2 - 1 } eq. a-4 i x - 1  i = 0 adini conversion time for the first bit sampling time comparison time repeated (10 times) for 10 bits second bit sampling time when sample-and-hold is disabled * when sam p le-and-hold is enabled, the analo g in p ut is sam p led for onl y the first bit. figure 11.5.2 a-d conversion timing diagram figure 11.5.2 shows an a-d conversion timing diagram. c2 must be charged up within the sampling time shown in this diagram. when the sample-and-hold function is disabled, the sampling time for the second and subsequent bits is about half that of the first bit. the sampling times at the respective conversion speeds are listed in the table 11.5.1. note that when the sample-and-hold function is enabled, the analog input is sampled for only the first bit.
11 11-43 a-d converter 32176 group user?s manual (rev.1.01) 11.5 precautions on using a-d converter table 11.5.1 sampling time (in which c2 needs to be charged) conversion start method conversion speed sampling time for the first bit sampling time for the second and subsequent bits single mode slow mode normal speed 27.5bclk 13.5bclk (when sample-and double speed 15.5bclk 7.5bclk -hold disabled) fast mode normal speed 11.5bclk 5.5bclk double speed 7.5bclk 3.5bclk single mode slow mode normal speed 27.5bclk ? (when sample-and double speed 15.5bclk ? -hold enabled) fast mode normal speed 11.5bclk ? double speed 7.5bclk ? comparator mode slow mode normal speed 27.5bclk ? double speed 15.5bclk ? fast mode normal speed 11.5bclk ? double speed 7.5bclk ? therefore, the time in which c2 needs to be charged is found from eq. b-1, as follows: sampling time (in which c2 needs to be charged) > cin
11 11-44 a-d converter 32176 group user?s manual (rev.1.01) this page is blank for reasons of layout. 11.5 precautions on using a-d converter
chapter 12 serial i/o 12.1 outline of serial i/o 12.2 serial i/o related registers 12.3 transmit operation in csio mode 12.4 receive operation in csio mode 12.5 precautions on using csio mode 12.6 transmit operation in uart mode 12.7 receive operation in uart mode 12.8 fixed period clock output function 12.9 precautions on using uart mode
12 12-2 serial i/o 32176 group user?s manual (rev.1.01) 12.1 outline of serial i/o the 32176 contains a total of four serial i/o channels, sio0?sio3. channels sio0 and sio1 can be selected between csio mode (clock-synchronous serial i/o) and uart mode (clock-asynchronous serial i/o). channels sio2 and sio3 are uart mode only. ? csio mode (clock-synchronous serial i/o) communication is performed synchronously with a transfer clock, using the same clock on both transmit and receive sides. the transfer data is 8 bits long (fixed). ? uart mode (clock-asynchronous serial i/o) communication is performed at any transfer rate in any transfer data format. the transfer data length can be selected from 7, 8 and 9 bits. channels sio0?sio3 each have a transmit dma transfer and a receive dma transfer request. these serial i/os, when combined with the internal dma controller (dmac), allow serial communication to be performed at high speed, as well as reduce the data communication load of the cpu. serial i/o is outlined below. table 12.1.1 outline of serial i/o item description number of channels csio mode/uart mode : 2 channels (sio0, sio1) uart only : 2 channels (sio2, sio3) clock during csio mode : internal clock or external clock as selected (note 1), clock polarity can be selected during uart mode : internal clock only transfer mode transmit half-duplex, receive half-duplex, transmit/receive full-duplex brg count source f(bclk), f(bclk)/8, f(bclk)/32, f(blck)/256 (note 2) (when internal clock selected) f(bclk): peripheral clock operating frequency data format csio mode : data length = 8 bits (fixed) order of transfer = lsb first (fixed) uart mode : start bit = 1 bit character length = 7, 8 or 9 bits parity bit = added (odd, even) or not added stop bit = 1 or 2 bits order of transfer = lsb first (fixed) baud rate csio mode : 152 bits/sec to 2 mbits/sec (when f(bclk) = 20 mhz) uart mode : 19 bits/sec to 1.25 mbits/sec (when f(bclk) = 20 mhz) error detection csio mode : overrun error only uart mode : overrun, parity and framing errors (occurrence of any of these errors is indicated by an error sum bit) fixed period clock output function when using sio0 and sio1 as uart, this function outputs a divided-by-2 brg clock from the sclk pin. note 1: the maximum input frequency of an external clock during csio mode is f(bclk)/16. note 2: if f(bclk) is selected as the count source, the brg set value is subject to limitations. 12.1 outline of serial i/o
12 12-3 serial i/o 32176 group user?s manual (rev.1.01) table 12.1.2 interrupt generation functions of serial i/o serial i/o interrupt request source icu interrupt sources sio0 transmit buffer empty or transmission finished sio0 transmit interrupt sio0 reception finished or receive error sio0 receive interrupt sio1 transmit buffer empty or transmission finished sio1 transmit interrupt sio1 reception finished or receive error sio1 receive interrupt sio2 transmit buffer empty or transmission finished sio2,3 transmit/receive interrupt (group interrupt) sio2 reception finished or receive error sio2,3 transmit/receive interrupt (group interrupt) sio3 transmit buffer empty or transmission finished sio2,3 transmit/receive interrupt (group interrupt) sio3 reception finished or receive error sio2,3 transmit/receive interrupt (group interrupt) note: ? the transmission-finished interrupt is effective when the internal clock is selected in uart or csio mode. table 12.1.3 dma transfer request generation functions of serial i/o serial i/o dma transfer request dmac input channels sio0 transmit buffer empty dma3 sio0 reception finished dma4 sio1 transmit buffer empty dma6 sio1 reception finished dma3 sio2 transmit buffer empty dma7 sio2 reception finished dma5 sio3 transmit buffer empty dma9 sio3 reception finished dma8 12.1 outline of serial i/o
12 12-4 serial i/o 32176 group user?s manual (rev.1.01) sclki0/sclko0 bclk, bclk/8, bclk/32, bclk/256 baud rate generator (brg) bclk (set value + 1) 1 internal data bus csio mode when internal clock selected csio mode uart mode when internal clock selected 1/16 1/2 clock divider rxd0 txd0 receive interrupt request transmit/ receive control circuit sio0 transmit buffer register sio0 transmit shift register receive dma transfer request transmit interrupt request transmit dma transfer request to dma3 sio0 receive shift register sio0 receive buffer register when external clock selected when uart mode selected notes:  when bclk is selected, the brg set value is subject to limitations.  sio2 and sio3 do not have the sclki/sclko function. sclki1/sclko1 to dma6 to the interrupt controller (icu) sio0 sio1 sio2 sio3 rxd1 txd1 transmit/ receive control circuit sio1 transmit shift register sio1 receive shift register to dma7 rxd2 txd2 transmit/ receive control circuit sio2 transmit shift register sio2 receive shift register to dma9 rxd3 txd3 transmit/ receive control circuit sio3 transmit shift register sio3 receive shift register receive interrupt request receive dma transfer request transmit interrupt request transmit dma transfer request receive interrupt request receive dma transfer request transmit interrupt request transmit dma transfer request receive interrupt request receive dma transfer request transmit interrupt request transmit dma transfer request to the interrupt controller (icu) to dma8 to dma5 to dma3 to dma4 to the interrupt controller (icu) figure 12.1.1 block diagram of sio0?sio3 12.1 outline of serial i/o
12 12-5 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) 12.2 serial i/o related registers shown below is a serial i/o related register map. serial i/o related register map address +0 address +1 address see b0 b7 b8 b15 pages h'0080 0100 sio23 interrupt request status register sio03 interrupt request mask register 12-9 (si23stat) (si03mask) 12-10 h'0080 0102 sio03 interrupt source select register (use inhibited area) 12-11 (si03sel) | (use inhibited area) h'0080 0110 sio0 transmit control register sio0 transmit/receive mode register 12-13 (s0tcnt) (s0mod) 12-15 h'0080 0112 sio0 transmit buffer register 12-18 (s0txb) h'0080 0114 sio0 receive buffer register 12-19 (s0rxb) h'0080 0116 sio0 receive control register sio0 baud rate register 12-20 (s0rcnt) (s0baur) 12-23 h'0080 0118 sio0 special mode register (use inhibited area) 12-24 (s0smod) | (use inhibited area) h'0080 0120 sio1 transmit control register sio1 transmit/receive mode register 12-13 (s1tcnt) (s1mod) 12-15 h'0080 0122 sio1 transmit buffer register 12-18 (s1txb) h'0080 0124 sio1 receive buffer register 12-19 (s1rxb) h'0080 0126 sio1 receive control register sio1 baud rate register 12-20 (s1rcnt) (s1baur) 12-23 h'0080 0128 sio1 special mode register (use inhibited area) 12-24 (s1smod) | (use inhibited area) h'0080 0130 sio2 transmit control register sio2 transmit/receive mode register 12-13 (s2tcnt) (s2mod) 12-15 h'0080 0132 sio2 transmit buffer register 12-18 (s2txb) h'0080 0134 sio2 receive buffer register 12-19 (s2rxb) h'0080 0136 sio2 receive control register sio2 baud rate register 12-20 (s2rcnt) (s2baur) 12-23 | (use inhibited area) h'0080 0140 sio3 transmit control register sio3 transmit/receive mode register 12-13 (s3tcnt) (s3mod) 12-15 h'0080 0142 sio3 transmit buffer register 12-18 (s3txb) h'0080 0144 sio3 receive buffer register 12-19 (s3rxb) h'0080 0146 sio3 receive control register sio3 baud rate register 12-20 (s3rcnt) (s3baur) 12-23
12 12-6 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) 12.2.1 sio interrupt related registers the sio interrupt related registers are used to control the interrupt request signals output from sio to the interrupt controller (icu), as well as select the source of each interrupt request. (1) interrupt request status bit this status bit is used to determine whether an interrupt is requested. when an interrupt request occurs, this bit is set in hardware (cannot be set in software). the status bit is cleared by writing "0". writing "1" has no effect; the bit retains the status it had before the write. because this bit is unaffected by the interrupt request mask bit, it can also be used to inspect the operating status of peripheral functions. in interrupt handling, make sure that within the grouped interrupt request status, only the status bit for the interrupt request that has been serviced is cleared. if the status bit for any interrupt request that has not been serviced is cleared, the pending interrupt request is cleared simultaneously with its status bit. (2) interrupt request mask bit this bit is used to disable unnecessary interrupt requests within the grouped interrupt request. set this bit to "1" to enable interrupt requests or "0" to disable interrupt requests. figure 12.2.1 interrupt request status and mask registers to the interrupt controller interrupt request from each peripheral function interrupt request status data bus set  group interrupt interrupt request enable clear f/f f/f data=0
12 12-7 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) figure 12.2.2 example for clearing interrupt request status b4 5 b7 interrupt request status initial state bit 6 event occurs interrupt request bit 4 event occurs only bit 6 cleared bit 4 data retained b4 5 b7 1 1 0 1 write to the interrupt request status example for clearing interrupt request status 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 program example istreg = 0xfd; /* clear istat1 (0x02 bit) only */  to clear the interrupt request status register 0 (istreg) interrupt request status 1: istat1 (0x02 bit) to clear an interrupt request status, always be sure to write 1 to all other interrupt request status bits. at this time, avoid using a logic operation like the one shown below. because it requires three step-istreg read, logic operation and write, if another interrupt request occurs between the read and write, status may be inadvertently cleared. b4 5 6 b7 interrupt request status bit 6 event occurs bit 4 event occurs only bit 6 cleared bit 4 also cleared 0 0 1 0 1 0 1 0 0 0 0 0 read 0 0 1 0 0 0 0 0 clear bit 6 (anding with 1101) write 6 6 istreg &= 0xfd; /* clear istat1 (0x02 bit) only */
12 12-8 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) receive dma transfer request rfin (reception finished bit) note:  no rece p tion-finished dma transfer re q uests are g enerated if a receive error occurs. figure 12.2.4 reception-finished dma transfer request (3) selecting the source of an interrupt request the interrupt request signals sent from each sio to the interrupt controller (icu) are classified into transmit interrupts and receive interrupts. transmit interrupt requests can be generated when the transmit buffer is empty or transmission is finished, and the receive interrupt requests can be generated when reception is finished or an receive error is detected, as selected by the interrupt source select register (si03sel). notes: ? no interrupt request signals are generated unless interrupts are generated by the sio interrupt request mask register after enabling the ten (transmit enable) bit or ren (receive enable) bit for the corresponding sio. ? sio2 and sio3 together comprise one interrupt group. ? the transmission-finished interrupt is effective when the internal clock is selected in uart or csio mode. (4) notes on using transmit interrupts while the sio interrupt request mask register is set to enable interrupts, a transmit interrupt request is generated upon enabling the corresponding ten (transmit enable) bit. (5) about dma transfer requests from sio each sio can generate a transmit dma transfer and a reception-finished dma transfer request. these dma transfer requests can be generated by enabling each sio?s corresponding ten (transmit enable) bit or ren (receive enable) bit. when using dma transfers to communicate with external devices, be sure to set the dma controller (dmac) before enabling the ten or ren bit. no reception-finished dma transfer requests are generated if a receive error occurs. ? transmit dma transfer request generated when the transmit buffer is empty and the ten bit is enabled. ten (transmit enable bit) tbe (transmit buffer empty bit) transmit dma transfer re q uest figure 12.2.3 transmit dma transfer request ? reception-finished dma transfer request a dma transfer request is generated when the receive buffer is filled.
12 12-9 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) 12.2.2 sio interrupt control registers sio23 interrupt request status register (si23stat) b bit name function r w 0?3 no function assigned. fix to "0". 00 4 irqt2 0: interrupt not requested r (note 1) sio2 transmit interrupt request status bit 1: interrupt requested 5 irqr2 0: interrupt not requested r (note 1) sio2 receive interrupt request status bit 1: interrupt requested 6 irqt3 0: interrupt not requested r (note 1) sio3 transmit interrupt request status bit 1: interrupt requested 7 irqr3 0: interrupt not requested r (note 1) sio3 receive interrupt request status bit 1: interrupt requested note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. the register indicates the transmit/receive interrupt requests from sio2 and sio3. [setting the interrupt request status bit] this bit can only be set in hardware, and cannot be set in software. [clearing the interrupt request status bit] this bit is cleared by writing "0" in software. note: ? if the status bit is set in hardware at the same time it is cleared in software, the former has priority and the status bit is set. when writing to the sio interrupt request status register, make sure only the bits to be cleared are set to "0" and all other bits are set to "1". those bits that have been set to "1" are unaffected by writing in software and retain the value they had before the write. b0123456b7 irqt2 irqr2 irqt3 irqr3 00000000
12 12-10 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) sio03 interrupt request mask register (si03mask) b bit name function r w 8 t0mask 0: mask (disable) interrupt request r w sio0 transmit interrupt request mask bit 1: enable interrupt request 9 r0mask 0: mask (disable) interrupt request r w sio0 receive interrupt request mask bit 1: enable interrupt request 10 t1mask 0: mask (disable) interrupt request r w sio1 transmit interrupt request mask bit 1: enable interrupt request 11 r1mask 0: mask (disable) interrupt request r w sio1 receive interrupt request mask bit 1: enable interrupt request 12 t2mask 0: mask (disable) interrupt request r w sio2 transmit interrupt request mask bit 1: enable interrupt request 13 r2mask 0: mask (disable) interrupt request r w sio2 receive interrupt request mask bit 1: enable interrupt request 14 t3mask 0: mask (disable) interrupt request r w sio3 transmit interrupt request mask bit 1: enable interrupt request 15 r3mask 0: mask (disable) interrupt request r w sio3 receive interrupt request mask bit 1: enable interrupt request the register enables or masks (disables) the interrupt requests generated by each sio. interrupt requests from any sio are enabled by setting its corresponding interrupt request mask bit to "1". b8 9 1011121314b15 t0mask r0mask t1mask r1mask t2mask r2mask t3mask r3mask 00000000
12 12-11 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) sio03 interrupt request source select register (si03sel) b bit name function r w 0 ist0 0: transmit buffer empty interrupt r w sio0 transmit interrupt request source select bit 1: transmission finished interrupt 1 ist1 0: transmit buffer empty interrupt r w sio1 transmit interrupt request source select bit 1: transmission finished interrupt 2 ist2 0: transmit buffer empty interrupt r w sio2 transmit interrupt request source select bit 1: transmission finished interrupt 3 ist3 0: transmit buffer empty interrupt r w sio3 transmit interrupt request source select bit 1: transmission finished interrupt 4 isr0 0: reception finished interrupt r w sio0 receive interrupt request source select bit 1: receive error interrupt 5 isr1 0: reception finished interrupt r w sio1 receive interrupt request source select bit 1: receive error interrupt 6 isr2 0: reception finished interrupt r w sio2 receive interrupt request source select bit 1: receive error interrupt 7 isr3 0: reception finished interrupt r w sio3 receive interrupt request source select bit 1: receive error interrupt the register selects the source of interrupt requests generated by each sio when transmit or receive operation is completed. (1) sion transmit interrupt source select bit [when set to "0"] the transmit buffer empty interrupt is selected. a transmit buffer empty interrupt request is generated when data is transferred from the transmit buffer register to the transmit shift register. also, a transmit buffer empty interrupt request is generated when the ten (transmit enable) bit is set to "1" (interrupt enabled). [when set to "1"] the transmission finished (transmit shift buffer empty) interrupt is selected. a transmission finished interrupt request is generated when all of the data in the transmit shift register has been transferred. note: ? do not select the transmission finished interrupt when an external clock is selected in csio mode. (2) sion receive interrupt request source select bit [when set to "0"] the reception finished (receive buffer full) interrupt is selected. a reception finished interrupt request is also generated when a receive error (except overrun error) occurs. [when set to "1"] the receive error interrupt is selected. following types of errors constitute a receive error: ? csio mode: overrun error ? uart mode: overrun, parity and framing errors b0123456b7 ist0 ist1 ist2 ist3 isr0 isr1 isr2 isr3 00000000
12 12-12 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) figure 12.2.5 block diagram of sio2,3 transmit/receive interrupt requests f/f f/f r3mask irqr3 f/f f/f t3mask irqt3 f/f f/f r2mask irqr2 f/f f/f t2mask irqt2 b15 b7 b14 b6 b13 b5 b12 b4 data bus sio2, 3 transmit/receive interrupt requests (level) 4-source inputs f/f sio2 reception finished sio2 receive error isr2 b6 f/f sio2 transmit buffer empty sio2 transmission finished ist2 b2 f/f sio3 transmit buffer empty sio3 transmission finished ist3 b3 f/f sio3 reception finished sio3 receive error isr3 b7
12 12-13 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) 12.2.3 sio transmit control registers sio0 transmit control register (s0tcnt) sio1 transmit control register (s1tcnt) sio2 transmit control register (s2tcnt) sio3 transmit control register (s3tcnt) b bit name function r w 0, 1 no function assigned. fix to "0". 00 2, 3 cdiv b2 b3 r w brg count source select bit 0 0: select f(bclk) 0 1: select f(bclk) divided by 8 1 0: select f(bclk) divided by 32 1 1: select f(bclk) divided by 256 4 no function assigned. fix to "0". 00 5 tstat 0: transmission stopped and no data in transmit buffer register r ? transmit status bit 1: transmitting now or data present in transmit buffer register 6 tbe 0:data present in transmit buffer register r ? transmit buffer empty bit 1: no data in transmit buffer register 7 ten 0: disable transmission r w transmit enable bit 1: enable transmission b0123456b7 cdiv tstat tbe ten 00010010
12 12-14 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) (1) cdiv (baud rate generator count source select) bits (bits 2?3) these bits select the count source for the baud rate generator (brg). note: ? if f(bclk) is selected as the count source for the brg, care must be taken when setting the brg so that the baud rate will not exceed the maximum transfer speed. for details, see the section 12.2.8, "sio baud rate registers". (2) tstat (transmit status) bit (bit 5) [set condition] this bit is set to "1" by a write to the transmit buffer register while transmission is enabled. [clear condition] this bit is cleared to "0" when transmission is idle (no data in the transmit shift register) and no data exists in the transmit buffer register. this bit is also cleared by clearing the transmit enable bit. (3) tbe (transmit buffer empty) bit (bit 6) [set condition] this bit is set to "1" when data is transferred from the transmit buffer register to the transmit shift register and the transmit buffer register is thereby emptied. this bit is also set by clearing the transmit enable bit to "0". [clear condition] this bit is cleared to "0" by writing data to the lower byte of the transmit buffer register while transmission is enabled (ten = "1"). (4) ten (transmit enable) bit (bit 7) transmission is enabled by setting this bit to "1" and disabled by clearing this bit to "0". if this bit is cleared to "0" while transmitting data, the transmit operation stops.
12 12-15 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) 12.2.4 sio transmit/receive mode registers sio0 transmit/receive mode register (s0mod) sio1 transmit/receive mode register (s1mod) sio2 transmit/receive mode register (s2mod) sio3 transmit/receive mode register (s3mod) b bit name function r w 8?10 smod b8 b9 b10 r w serial i/o mode select bit 0 0 0 : 7-bit uart (note 1) 0 0 1 : 8-bit uart 0 1 0 : 9-bit uart 0 1 1 : 9-bit uart 1 0 0 : 8-bit clock-synchronous serial i/o 1 0 1 : 8-bit clock-synchronous serial i/o 1 1 0 : 8-bit clock-synchronous serial i/o 1 1 1 : 8-bit clock-synchronous serial i/o 11 cks 0: internal clock r w internal/external clock select bit 1: external clock (note 2) 12 stb 0: one stop bit r w stop bit length select bit, uart mode only 1: two stop bits (note 3) 13 psel 0: odd parity r w odd/even parity select bit, uart mode only 1: even parity (note 3) 14 pen 0: disable parity r w parity enable bit, uart mode only 1: enable parity (note 3) 15 sen 0: disable sleep function r w sleep select bit, uart mode only 1: enable sleep function (note 3) note 1: for sio2 and 3, bit 8 is fixed to "0" in hardware. this bit cannot be set to "1" in software (to select clock-synchronous seria l i/o). note 2: has no effect when uart mode selected. note 3: bits 12?15 have no effect during clock-synchronous mode. b8 9 1011121314b15 smod cks stb psel pen sen 00000000
12 12-16 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) the sio transmit/receive mode registers consist of bits to set the serial i/o operation mode, data format and the functions used during communication. the sio transmit/receive mode registers must always be set before the serial i/o starts operating. to change register settings after the serial i/o starts sending or receiving data, first confirm that transmit and receive operations have finished and then disable transmit/receive operations (by clearing the sio transmit control register transmit enable bit and sio receive control register receive enable bit to "0") before making changes. (1) smod (serial i/o mode select) bits (bits 8?10) these bits select the operation mode of serial i/o. (2) cks (internal/external clock select) bit (bit 11) this bit is effective when csio mode is selected. setting this bit has no effect when uart mode is selected, in which case the serial i/o is clocked by the internal clock. (3) stb (stop bit length select) bit (bit 12) this bit is effective during uart mode. use this bit to select the stop bit length that indicates the end of data to transmit. setting this bit to "0" selects one stop bit, and setting this bit to "1" selects two stop bits. during clock-synchronous mode, the content of this bit has no effect. (4) psel (odd/even parity select) bit (bit 13) this bit is effective during uart mode. when parity is enabled (bit 14 = "1"), use this bit to select the parity attribute (whether odd or even). setting this bit to "0" selects an odd parity, and setting this bit to "1" selects an even parity. when parity is disabled (bit 14 = "0") or during clock-synchronous mode, the content of this bit has no effect. (5) pen (parity enable) bit (bit 14) this bit is effective during uart mode. when this bit is set to "1", a parity bit is added immediately after the data bits of the transmit data, and the received data is checked for parity. the parity bit added to the transmit data is automatically determined to be "0" or "1" so that the attribute (odd/ even) derived by adding the number of 1?s in data bits and the content of the parity bit agrees with one that was selected with the odd/even parity select bit (bit 13). figure 12.2.6 shows an example of a data format when parity is enabled. (6) sen (sleep select) bit (bit 15) this bit is effective during uart mode. if the sleep function is enabled by setting this bit to "1", data is latched into the uart receive buffer register only when the most significant bit (msb) of the received data is "1".
12 12-17 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01)  when transmitting if the attribute (odd/even) represented by the number of 1's in data bits agrees with the selected parity attribute, a parity bit "0" is added. if the attribute (odd/even) represented by the number of 1's in data bits does not agree with the selected parity attribute, a parity bit "1" is added. b7 b6 b5 b4 b3 b2 b1 b0 pa r s p st attribute derived from b7 + b6 + ... + b0 if it agrees with the selected parity attribute, par = "0" is added. if it does not agree with the selected parity attribute, par = "1" is added. lsb msb  when receiving the received data is checked to see if the number of 1's included in its data and parity bits agrees with the parity attribute (known as parity check). b7 b6 b5 b4 b3 b2 b1 b0 pa r s p st lsb msb if the result of b7 + b6 + ... + b0 + par does not agree with the selected parity attribute, a parity error is assume d notes :  shown above is an example of a data format in 8-bit uart mode.  the data bit numbers (bn) above indicate bit numbers in a data list, and not the register bit numbers (bn). b8 b7 b6 b5 b4 b3 b2 b1 pa r s p st b0  9-bit uart mode b7 b6 b5 b4 b3 b2 b1 b0 pa r s p st  8-bit uart mode b6 b5 b4 b3 b2 b1 b0 pa r s p st (note 1)  7-bit uart mode b7 b6 b5 b4 b3 b2 b1  clock-synchronous mode b0 note 1: whether or not to add a parity bit is selectable. note 2: the stop bit can be chosen to be one bit or two bits long. direction of transfer st : start bit par : parity bit : one frame equivalent b : data bits sp : stop bit (note 2) (note 1) (note 1) (note 2) (note 2) figure 12.2.6 data format when parity is enabled
12 12-18 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) b01234567891011121314b15 tdata ? ??????????????? 12.2.5 sio transmit buffer registers sio0 transmit buffer register (s0txb) sio1 transmit buffer register (s1txb) sio2 transmit buffer register (s2txb) sio3 transmit buffer register (s3txb) b bit name function r w 0?6 no function assigned. fix to "0". ?0 7?15 tdata transmit data is set in these bits. ? w transmit data the sio transmit buffer registers are used to set transmit data. these registers are a write-only register, and the contents of these registers cannot be read out. data must be lsb-aligned when set in these registers. therefore, write transmit data to bits 9?15 for the 7-bit data format (uart mode only), bits 8?15 for the 8-bit data format, or bits 7?15 for the 9-bit data format (uart mode only). before setting transmit data in these registers, enable the transmit control register ten (transmit enable) bit by setting it to "1". writing data to these registers while the ten bit is disabled (cleared to "0") has no effect. when data is written to the sio transmit buffer register while transmission is enabled, the data is transferred from that register to the sio transmit shift register, upon which the serial i/o starts sending data. note: for the 7-bit and 8-bit data formats, the register can be accessed bytewise.
12 12-19 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) 12.2.6 sio receive buffer registers sio0 receive buffer register (s0rxb) sio1 receive buffer register (s1rxb) sio2 receive buffer register (s2rxb) sio3 receive buffer register (s3rxb) b bit name function r w 0?6 no function assigned. 0? 8?15 rdata received data is stored in these bits. r ? received data the sio receive buffer registers are used to store the received data. when the serial i/o has finished receiv- ing data, the content of the sio receive shift register is transferred to the sio receive buffer register. these registers are a read-only register. for the 7-bit data format (uart mode only), data is set in bits 9?15, with bits 8 and 7 always set to "0". for the 8-bit data format, data is set in bits 8?15, with bit 7 always set to "0". when reading the content of the sio receive buffer register after reception is completed, if the serial i/o finishes receiving the next data before the previous data is not read out, an overrun error occurs and the subse- quent received data are not transferred to the receive buffer register. to restart normal receive operation, clear the receive control register ren (receive enable) bit to "0". note: for the 7-bit and 8-bit data formats, the register can be accessed bytewise. b01234567891011121314b15 rdata ? ???????????????
12 12-20 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) 12.2.7 sio receive control registers sio0 receive control register (s0rcnt) sio1 receive control register (s1rcnt) sio2 receive control register (s2rcnt) sio3 receive control register (s3rcnt) b bit name function r w 0 no function assigned. fix to "0". 00 1 rstat 0: reception stopped r ? receive status bit 1: reception in progress 2 rfin 0: no data in receive buffer register r ? reception finished bit 1: data present in receive buffer register 3 ren 0: disable reception r w receive enable bit 1: enable reception 4 ovr 0: no overrun error r ? overrun error bit 1: overrun error occurred 5 pty 0: no parity error r ? parity error bit, uart mode only 1: parity error occurred 6 flm 0: no framing error r ? framing error bit, uart mode only 1: framing error occurred 7 ers 0: no error r ? error sum bit 1: error occurred b0123456b7 rstat rfin ren ovr pty flm ers 00000000
12 12-21 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) (1) rstat (receive status) bit (bit 1) [set condition] this bit is set to "1" by a start of receive operation. when this bit = "1", the serial i/o is receiving data. [clear condition] this bit is cleared to "0" upon completion of receive operation or by clearing the ren (receive enable) bit. (2) rfin (reception finished) bit (bit 2) [set condition] this bit is set to "1" when all data bits have been received in the receive shift register and whose content is transferred to the receive buffer register. [clear condition] this bit is cleared to "0" by reading out the lower byte of the receive buffer register or by clearing the ren (receive enable) bit. however, if an overrun error occurs, this bit cannot be cleared by reading out the lower byte of the receive buffer register. in this case, clear ren (receive enable) bit to "0". (3) ren (receive enable) bit (bit 3) reception is enabled by setting this bit to "1", and is disabled by clearing this bit to "0", in which case the receiver unit is initialized. accordingly, the receive status and reception finished flags, as well as the overrun error, framing error, parity error and error sum flags all are cleared. the receive operation stops if the receive enable bit is cleared to "0" while receiving data. (4) ovr (overrun error) bit (bit 4) [set condition] this bit is set to "1" when all bits of the next received data have been set in the receive shift register while the receive buffer register still contains the previous received data. in this case, the received data is not stored in the receive buffer register. although receive operation continues even when the overrun error flag = "1", the received data is not stored in the receive buffer register. this error bit must be cleared before normal reception can be restarted. [clear condition] this bit is cleared to "0" by only clearing the ren (receive enable) bit.
12 12-22 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) (5) pty (parity error) bit (bit 5) this bit is effective in only uart mode. it is fixed to "0" during csio mode. [set condition] the pty (parity error) bit is set to "1" when the sio transmit/receive mode register pen (parity enable/disable) bit is enabled and the parity (even or odd) of the received data does not agree with one that was set by the said register?s psel (parity select) bit. [clear condition] the pty bit is cleared to "0" by reading out the lower byte of the sio receive buffer register or by clearing the sio receive control register ren (receive enable) bit. however, if an overrun error oc- curs, this bit cannot be cleared by reading out the lower byte of the receive buffer register. in this case, clear the ren (receive enable) bit. (6) flm (framing error) bit (bit 6) this bit is effective in only uart mode. it is fixed to "0" during csio mode. [set condition] the flm (framing error) bit is set to "1" when the number of received bits does not agree with one that was set by the sio transmit/receive mode register. [clear condition] the flm bit is cleared to "0" by reading out the lower byte of the sio receive buffer register or by clearing the sio receive control register ren (receive enable) bit. however, if an overrun error occurs, this bit cannot be cleared by reading out the lower byte of the receive buffer register. in this case, clear the ren (receive enable) bit to "0". (7) ers (error sum) bit (bit 7) [set condition] this flag is set to "1" when any of overrun, framing or parity errors is detected at completion of reception. [clear condition] if the detected error was an overrun error, this flag is cleared by clearing the ren (receive enable) bit to "0". otherwise, this flag is cleared by reading out the lower byte of the sio receive buffer register or by clearing the sio receive control register ren (receive enable) bit.
12 12-23 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) 12.2.8 sio baud rate registers sio0 baud rate register (s0baur) sio1 baud rate register (s1baur) sio2 baud rate register (s2baur) sio3 baud rate register (s3baur) b bit name function r w 8?15 brg set a baud rate divide value r w baud rate divide value (1) brg (baud rate divide value) (bits 8?15) the sio baud rate registers are used to set a baud rate divide value, so that the baud rate count source selected by sio mode register is divided by (brg set value + 1). because the brg value initially is undefined, be sure to set the divide value before the serial i/o starts operating. the value written to the brg during transmit/receive operation takes effect in the next cycle after the brg counter has finished counting. when using the internal clock (to output the sclko signal) in csio mode, the serial i/o divides the internal bclk using a clock divider and then divides the resulting clock by (brg set value + 1) and further by 2, thereby generating a transmit/receive shift clock. when using an external clock in csio mode, the serial i/o does not use the brg. (transmit/receive opera- tions are synchronized to the externally supplied clock.) during uart mode, the serial i/o divides the internal bclk using a clock divider and then divides the resulting clock by (brg set value + 1) and further by 16, thereby generating a transmit/receive shift clock. when using sio0 or sio1 in uart mode, set the relevant port (p84 or p87) to function as an sclko pin, so that a brg output clock divided by 2 can be output from that sclko pin. when using the internal clock (internally clocked csio mode), if f(bclk) is selected as the brg count source, make sure the transfer rate does not exceed 2 mbits/second during csio mode. b8 9 1011121314b15 brg ????????
12 12-24 serial i/o 12.2 serial i/o related registers 32176 group user?s manual (rev.1.01) b0123456b7 ckpol 00000000 12.2.9 sio special mode registers sio0 special mode register (s0smod) sio1 special mode register (s1smod) b bit name function r w 0?6 no function assigned. 00 7 ckpol 0: transmit data is output at a fall of sclk r w transmit/receive clock polarity select bit receive data is latched in at a rise of sclk 1: transmit data is output at a rise of sclk receive data is latched in at a fall of sclk (1) ckpol(transmit/receive clock polarity select) bit (bit 7) this bit selects the polarity of the transmit/receive clock when in csio mode. when the ckpol bit is set to "0", data is output from the txd pin synchronously with a falling edge of sclk, and data is taken in from the rxd pin synchronously with a rising edge of sclk. when the ckpol bit is set to "1", data is output from the txd pin synchronously with a rising edge of sclk, and data is taken in from the rxd pin synchronously with a falling edge of sclk. notes ? do not rewrite the clock polarity select bit when the transmit enable bit or receive enable bit is enabled. figure 12.2.7 selecting the transmit/receive clock polarity rxd transmit/receive clock txd note:  when the internal clock is selected, the sclko pin outputs a high-level signal when the serial i/o is neither transmitting nor receiving. rxd transmit/receive clock txd b7 b6 b5 b4 b3 b2 b1 b0 note:  when the internal clock is selected, the sclko pin outputs a low-level signal when the serial i/o is neither transmitting nor receiving. (1) when the clock polarity select bit = 0 (2) when the clock polarity select bit = 1 b7 b6 b5 b4 b3 b2 b1 b0 b7 b6 b5 b4 b3 b2 b1 b0 b7 b6 b5 b4 b3 b2 b1 b0
12 12-25 serial i/o 12.3 transmit operation in csio mode 32176 group user?s manual (rev.1.01) 12.3 transmit operation in csio mode 12.3.1 setting the csio baud rate the baud rate (data transfer rate) in csio mode is determined by a transmit/receive shift clock. the clock source from which a transmit/receive shift clock derives is selected from the internal clock f(bclk) or external clock. the cks (internal/external clock select) bit (sio transmit/receive mode register bit 11) is used to select the clock source. the equation used to calculate the transmit/receive baud rate differs depending on whether an internal or exter- nal clock is selected. (1) when internal clock is selected in csio mode when the internal clock is selected, f(bclk) is divided by a clock divider before being supplied to the baud rate generator (brg). the clock divider?s divide-by value is selected from 1, 8, 32 or 256 by using the cdiv (baud rate generator count source select) bits (transmit control register bits 2?3). the baud rate generator divides the clock divider output by (baud rate register set value + 1) and further by 2, thus generating a transmit/receive shift clock. when the internal clock is selected in csio mode, the baud rate is calculated using the equation below. baud rate = f(bclk) [bps] clock divider?s divide-by value x (baud rate register set value + 1) x 2 f(bclk): peripheral clock operating frequency baud rate register set value = h?00 to h?ff (note 1) clock divider?s divide-by value = 1, 8, 32 or 256 note 1: if divide-by-1 (i.e., f(bclk) itself) is selected as the baud rate generator count source, use caution when setting the baud rate register so that the transfer rate will not exceed 2 mbps. (2) when external clock is selected in csio mode in this case, the baud rate generator is not used, and the input clock from the sclki pin serves directly as a transmit/receive shift clock for csio. the maximum frequency of the sclki pin input clock is f(bclk)/16. baud rate = sclki pin input clock [bps]
12 12-26 serial i/o 12.3 transmit operation in csio mode 32176 group user?s manual (rev.1.01) 12.3.2 initializing csio transmission to transmit data in csio mode, initialize the serial i/o following the procedure described below. (1) setting sio special mode register ? select the clock polarity in csio mode. (2) setting sio transmit/receive mode register ? set the register to csio mode. ? select the internal or an external clock. (3) setting sio transmit control register ? select the clock divider?s divide-by ratio (when internal clock selected). (4) setting sio baud rate register when the internal clock is selected, set a baud rate generator value. (see section 12.3.1, ?setting the csio baud rate.?) (5) setting sio interrupt related registers ? select the source of transmit interrupt request (transmit buffer empty or transmission finished) (sio interrupt request source select register). ? enable or disable transmit interrupt requests (sio interrupt request mask register). note: ? transmission finished interrupt requests are effective only when the internal clock is selected. (6) setting the interrupt controller (sio transmit interrupt control register) to use transmit interrupts, set their priority levels. (7) setting dmac to issue dma transfer requests to the internal dmac when the transmit buffer is empty, set up the dmac. (see chapter 9, ?dmac.?) (8) selecting pin functions because the serial i/o related pins serve dual purposes, set the pin functions for use as sio pins or input/ output ports. (see chapter 8, ?input/output ports and pin functions.?)
12 12-27 serial i/o 12.3 transmit operation in csio mode 32176 group user?s manual (rev.1.01) figure 12.3.1 procedure for initializing csio transmission set sio transmit/receive mode register initialize csio transmission note 1: necessary when the internal clock is selected. note 2: if the internal clock and a divide-by ratio = 1 are selected, caution must be used when setting the baud rate register so that the transfer rate will not exceed 2 mbps. note 3: transmission finished interrupts are effective only when the internal clock is selected.  set the register to csio mode  select the internal or external clock (when using dmac) set dmac (when using interrupts) set the interrupt controller set sio interrupt related registers  divide-by ratio = h'00 to h'ff (note 2) set sio baud rate register  select the clock divider divide-by ratio (note 1) set sio transmit control register set the input/output port operation mode register serial i/o related registers end of csio transmit initialization  enable or disable transmit interrupt requests  select the source of transmit interrupt request (note 3) set sio special mode register  select the clock polarity
12 12-28 serial i/o 12.3 transmit operation in csio mode 32176 group user?s manual (rev.1.01) 12.3.3 starting csio transmission the serial i/o starts a transmit operation when all of the following conditions are met after being initialized. (1) transmit conditions when csio mode internal clock is selected ? the sio transmit control register transmit enable bit is set to "1". ? transmit data (8 bits) is written to the lower byte of the sio transmit buffer register (transmit buffer empty bit = "0") (2) transmit conditions when csio mode external clock is selected ? the sio transmit control register transmit enable bit is set to "1". ? transmit data is written to the lower byte of the sio transmit buffer register (transmit buffer empty bit = "0") ? when the clock polarity select bit = "0", the transmit clock input at the sclki pin goes low; when the clock polarity select bit = "1", the transmit clock input at the sclki pin goes high. notes: ? while the transmit enable bit is cleared to "0", writes to the transmit buffer register are invalid. always set the transmit enable bit to "1" before writing to the transmit buffer register. ? when the internal clock is selected, a write to the lower byte of the transmit buffer register in above triggers transmission to start. ? the transmit status bit is set to "1" at the time data is set in the lower byte of the sio transmit buffer register. when transmission starts, the serial i/o sends data following the procedure described below. ? transfer the content of the sio transmit buffer register to the sio transmit shift register. ? set the transmit buffer empty bit to "1" (note 1). ? start sending data synchronously with the shift clock beginning with the lsb. note 1: a transmit interrupt request can be generated for reasons that the transmit buffer is empty or transmission has finished. also, a dma transfer request can be generated when the transmit buffer is empty. no dma transfer requests can be generated for reasons that transmission has finished. 12.3.4 successive csio transmission once data has been transferred from the transmit buffer register to the transmit shift register, the next data can be written to the transmit buffer register even when the serial i/o has not finished sending the previous data. if the next data is written to the transmit buffer register before transmission has finished, the previous and the next data are transmitted successively. check the sio transmit control register?s transmit buffer empty flag to see if data has been transferred from the transmit buffer register to the transmit shift register.
12 12-29 serial i/o 12.3 transmit operation in csio mode 32176 group user?s manual (rev.1.01) 12.3.5 processing at end of csio transmission when data transmission finishes, the following operation is automatically performed in hardware. (1) when not transmitting successively ? the transmit status bit is cleared to "0". (2) when transmitting successively ? when transmission of the last data in a consecutive data train finishes, the transmit status bit is cleared to "0". 12.3.6 transmit interrupts (1) transmit buffer empty interrupt if the transmit buffer empty interrupt was selected using the sio interrupt request source select register, a transmit buffer empty interrupt request is generated when data has been transferred from the transmit buffer register to the transmit shift register. a transmit buffer empty interrupt request is also generated when the ten (transmit enable) bit is set to "1" (disabled (2) transmission finished interrupt if the transmission finished interrupt was selected using the sio interrupt request source select register, a transmission finished interrupt request is generated by a falling edge of the internal transfer clock pulse at which the last bit of data in the transmit shift register has been transmitted. the sio interrupt request mask register and the interrupt controller (icu) must be set before these trans- mit interrupts can be used. 12.3.7 transmit dma transfer request when data has been transferred from the transmit buffer register to the transmit shift register, a transmit dma transfer request for the corresponding sio channel is output to the dmac. a transmit dma transfer request is also output when the ten (transmit enable) bit is set to "1" (disabled
12 12-30 serial i/o 12.3 transmit operation in csio mode 32176 group user?s manual (rev.1.01) figure 12.3.2 transmit operation during csio mode (hardware processing) the following processing is automatically performed in hardware.  transfer the content of the transmit buffer to the transmit shift register  set the transmit buffer empty bit to "1" transmit data y (successive transmission) transmit conditions met? transmit conditions met? y n n clear the transmit status bit to "0" transmit dma transfer request transmit interrupt request (note 1) csio transmit operation starts end of csio transmit operation note 1: this applies when the transmit interrupt request was enabled using the sio interrupt request enable register after selecting the transmit buffer empty interrupt with the sio interrupt request source select register.
12 12-31 serial i/o 12.3 transmit operation in csio mode 32176 group user?s manual (rev.1.01) 12.3.8 example of csio transmit operation the following shows a typical transmit operation in csio mode. figure 12.3.3 example of csio transmission (transmitted only once) note 1: changes of the interrupt controller's sio transmit interrupt control register interrupt request bit note 2: when transmit buffer empty interrupt is enabled (dma transfer can also be requested at the same time) note 3: when transmission finished interrupt is enabled note 4: the interrupt controller's ivect register is read or sio transmit interrupt control register interrupt request bit is cleared. note 5: a transmit interrupt request is generated when transmission is enabled. note 6: be aware that even after transmit data is written to the transmit buffer, a transmit interrupt request is generated whe n the data is transferred from the transmit buffer to the transmit shift register and the transmit buffer is thereby emptied. note 7: a transmission finished interrupt request is generated by a falling edge of the internal transfer clock pulse at which transmission of the transmit shift register data has finished. note 8: it is inhibited to select the transmission finished interrupt when an external clock is selected. internal clock selected external clock selected set transmit enable bit transmit buffer empty bit transmit status bit txd (when transmit buffer empty interrupt is selected) transmit interrupt request (note 2) (note 5) transmit interrupt request (note 2) (note 6) interrupt request accepted (note 4) set by a write to the transmit buffer write to the transmit buffer register transmit clock (sclko) cleared cleared by completion of transmission b7 b6 b5 b4 b3 b2 b1 b0 content of the transmit buffer register is transferred to the transmit shift register : interrupt request generated : processing by software sclko txd sclki rxd transmit interrupt request (note 3) (note 7) interrupt request accepted (note 4) (when transmission finished interrupt is selected)(note 8) (internal transfer clock) sio transmit interrupt request (note 1)
12 12-32 serial i/o 12.3 transmit operation in csio mode 32176 group user?s manual (rev.1.01) figure 12.3.4 example of csio transmission (transmitted successively) note 1: changes of the interrupt controller's sio transmit interrupt control register interrupt request bit note 2: when transmit buffer empty interrupt is enabled (dma transfer can also be requested at the same time) note 3: when transmission finished interrupt is enabled note 4: the interrupt controller's ivect register is read or sio transmit interrupt control register interrupt request bit is c leared. note 5: a transmit interrupt request is generated when transmission is enabled. note 6: be aware that even after transmit data is written to the transmit buffer, a transmit interrupt request is generated whe n the data is transferred from the transmit buffer to the transmit shift register and the transmit buffer is thereby empt ied. note 7: a transmission finished interrupt request is generated by a falling edge of the internal transfer clock pulse at which transmission of the transmit shift register data has finished. note 8: it is inhibited to select the transmission finished interrupt when an external clock is selected. : interrupt request generated : processing by software transmit enable bit transmit buffer empty bit transmit status bit txd sio transmit interrupt request (note 1) transmit clock (sclko) sclko txd sclki rxd b7 b6 b5 b0 b7 b6 b5 b0 (note 2) (note 5) (note 2) (note 2)(note 6) next data is written at a transmit buffer empty interrupt first data next data write to the transmit buffer register (first data) (next data) write to the transmit buffer register cleared internal clock selected external clock selected set (internal transfer clock) (when transmit buffer empty interrupt is selected) (when transmission finished interrupt is selected) (note 8) (note 3) transmit interrupt request (note 3)(note 7) interrupt request accepted (note 4) interrupt request accepted (note 4)
12 12-33 serial i/o 12.4 receive operation in csio mode 32176 group user?s manual (rev.1.01) 12.4 receive operation in csio mode 12.4.1 initialization for csio reception to receive data in csio mode, initialize the serial i/o following the procedure described below. note, however, that because the receive shift clock is derived by an operation of the transmit circuit, transmit operation must always be executed even when the serial i/o is used for only receiving data. (1) setting sio special mode register ? set the clock polarity in csio mode. (2) setting sio transmit/receive mode register ? set the register to csio mode. ? select the internal or an external clock. (3) setting sio transmit control register ? select the clock divider?s divide-by ratio (when internal clock selected). (4) setting sio baud rate register when the internal clock is selected, set a baud rate generator value. (see section 12.3.1, ?setting the csio baud rate.?) (5) setting sio interrupt related registers ? select the source of receive interrupt request (reception finished or error) (sio interrupt request source select register). ? enable or disable receive interrupts (sio interrupt request mask register). (6) setting sio receive control register ? set the receive enable bit. (7) setting the interrupt controller (sio transmit interrupt control register) to use receive interrupts, set their priority levels. (8) setting dmac set up the dmac when the dma transfer is requested to the internal dmac on completion of the transmission. (see chapter 9, ?dmac.?) (9) selecting pin functions because the serial i/o related pins serve dual purposes, set the pin functions for use as sio pins or input/ output ports. (see chapter 8, ?input/output ports and pin functions.?)
12 12-34 serial i/o 12.4 receive operation in csio mode 32176 group user?s manual (rev.1.01) figure 12.4.1 procedure for initializing csio reception note 1: necessary when the internal clock is selected. note 2: if the internal clock and a divide-by ratio = 1 are selected, caution must be used when setting the baud rate register so that the transfer rate will not exceed 2 mbps.  set the register to csio mode  select the internal or external clock set sio transmit/receive mode register (when using dmac) set dmac (when using interrupts) set the interrupt controller  select the source of receive interrupt request set sio interrupt related registers  divide-by ratio = h'00 to h'ff (note 2) set sio baud rate register  select the clock divider divide-by ratio (note 1) set sio transmit control register set the input/output port operation mode register serial i/o related registers set sio receive control register  set the receive enable bit end of csio receive initialization  enable or disable receive interrupt requests initialize csio reception  select the clock polarity set sio special mode register
12 12-35 serial i/o 12.4 receive operation in csio mode 32176 group user?s manual (rev.1.01) 12.4.2 starting csio reception the serial i/o starts receive operation when all of the following conditions are met after being initialized. (1) receive conditions when csio mode internal clock is selected ? the sio receive control register receive enable bit is set to "1". ? transmit conditions are met. (see section 12.3.3, ?starting csio transmission.?) (2) receive conditions when csio mode external clock is selected ? the sio receive control register receive enable bit is set to "1". ? transmit conditions are met. (see section 12.3.3, ?starting csio transmission.?) note: ? the receive status bit is set to "1" at the time dummy data is set in the lower byte of the sio transmit buffer register. when the above conditions are met, the serial i/o starts receiving 8-bit serial data (lsb first) synchronously with the receive shift clock. 12.4.3 processing at end of csio reception when data reception finishes, the following operation is automatically performed in hardware. (1) when reception is completed normally the reception finished (receive buffer full) bit is set to "1". notes: ? an interrupt request is generated if the reception finished (receive buffer full) interrupt has been enabled. ? a dma transfer request is generated. (2) when an error occurred during reception if an error (only overrun error in csio mode) occurred during reception, the overrun error bit and receive error sum bit are set to "1". notes: ? if the rece ption finished interrupt has been selected (by sio receive interrupt request source select register), neither a reception finished interrupt request nor a dma transfer request is generated. ? if the receive error interrupt has been selected (by sio receive interrupt request source select register), a receive error interrupt request is generated when interrupt requests are enabled. no dma transfer requests are generated.
12 12-36 serial i/o 12.4 receive operation in csio mode 32176 group user?s manual (rev.1.01) figure 12.4.2 receive operation during csio mode (hardware processing) receive data set the sio receive control register reception finished bit to "1" store the received data in the receive buffer register set the sio receive control register overrun error and receive error sum bits to "1" receive conditions met? overrun error ? y y n n end of csio receive operation csio receive operation starts 12.4.4 about successive reception if the following conditions are met when data reception has finished, data may be received successively. ? the receive enable bit is set to "1". ? transmit conditions are met. ? no overrun error has occurred.
12 12-37 serial i/o 12.4 receive operation in csio mode 32176 group user?s manual (rev.1.01) 12.4.5 flags showing the status of csio receive operation there are following flags that indicate the status of receive operation during csio mode: ? sio receive control register receive status bit ? sio receive control register reception finished bit ? sio receive control register receive error sum bit ? sio receive control register overrun error bit when reading the content of the sio receive buffer register after reception is completed, if the serial i/o finishes receiving the next data before the previous data is not read out, an overrun error occurs and the subse- quent received data are not transferred to the receive buffer register. before receive operation can be restarted, the receive enable bit must temporarily be cleared to "0" to initialize the receiver control unit. the above reception finished bit, if no receive errors occurred (note 1), may be cleared by reading out the lower byte of the sio receive buffer register or clearing the ren (receive enable) bit. however, if any receive error occurred, the reception finished bit can only be cleared by clearing the ren (receive enable) bit, and cannot be cleared by reading out the lower byte of the sio receive buffer register. note 1: overrun errors are the only error that can be detected during reception in csio mode.
12 12-38 serial i/o 12.4 receive operation in csio mode 32176 group user?s manual (rev.1.01) figure 12.4.3 example of csio reception (when received normally) note 1: changes of the interrupt controller's sio receive interrupt control register interrupt request bit note 2: when reception finished interrupt is enabled (dma transfer can also be requested at the same time) note 3: the interrupt controller's ivect register is read or sio receive interrupt control register interrupt request bit is cleared sclko txd sclki rxd internal clock selected external clock selected receive clock (sclko) set receive enable bit rxd receive status bit reception finished bit sio receive interrupt request (note 1) (when reception finished interrupt is selected) (when receive error interrupt is selected) no interrupt request interrupt request accepted (note 3) reception finished interrupt request (note 2) read from the receive buffer : interrupt request generated : processing by software automatically cleared for each receive operation performed clock stops cleared set by a write to the transmit buffer b7 b6 b5 b4 b3 b2 b1 b0 12.4.6 example of csio receive operation the following shows a typical receive operation in csio mode.
12 12-39 serial i/o 12.4 receive operation in csio mode 32176 group user?s manual (rev.1.01) figure 12.4.4 example of csio reception (when overrun error occurred) external clock selected internal clock selected sclko rxd sclki txd : processing by software : interrupt request generated receive clock (sclki) set receive enable bit b7 b6 b0 rxd b7 b6 b0 note 1: changes of the interrupt controller's sio receive interrupt control register interrupt request bit note 2: when reception finished interrupt is enabled note 3: when receive error interrupt is enabled note 4: the receive enable bit is cleared. note 5: the interrupt controller's ivect register is read or sio receive interrupt control register interrupt re q uest bit is cleared. first data reception completed next data reception completed reception finished bit sio receive interrupt request (note 1) (when reception finished interrupt is selected) receive buffer not read out during this interval set overrun error bit cleared (note 4) reception finished interrupt request (note 2) interrupt request accepted (note 5) cleared receive error interrupt request (note 3) interrupt request accepted (note 5) (when receive error interrupt is selected) overrun error bit
12 12-40 serial i/o 32176 group user?s manual (rev.1.01) 12.5 precautions on using csio mod 12.5 precautions on using csio mode ? settings of sio transmit/receive mode register and sio baud rate register the sio transmit/receive mode register and sio baud rate register and the transmit control register?s brg count source select bit must always be set when the serial i/o is not operating. if a transmit or receive operation is in progress, wait until the transmit and receive operations are finished and then clear the transmit and receive enable bits before making changes. ? settings of brg (baud rate register) if f(bclk) is selected with the brg clock source select bit, use caution when setting the brg register so that the transfer rate will not exceed 2 mbps. ? about successive transmission to transmit data successively, make sure the next transmit data is set in the sio transmit buffer register before the current data transmission finishes. ? about reception because the receive shift clock in csio mode is derived by an operation of the transmit circuit, transmit operation must always be executed (by sending dummy data) even when the serial i/o is used for only receiving data. in this case, be aware that if the port function is set for the txd pin (by setting the operation mode register to "1"), dummy data may actually be output from the pin. ? about successive reception to receive data successively, make sure that data (dummy data) is set in the sio transmit buffer register before a transmit operation on the transmitter side starts. ? transmission/reception using dma to transmit/receive data in dma request mode, enable the dmac to accept transfer requests (by setting the dma mode register) before serial communication starts. ? about reception finished bit if a receive error (overrun error) occurs, the reception finished bit can only be cleared by clearing the receive enable bit, and cannot be cleared by reading out the receive buffer register. ? about overrun error if all bits of the next received data have been set in the sio receive shift register before reading out the sio receive buffer register (i.e., an overrun error occurred), the received data is not stored in the receive buffer register, with the previous received data retained in it. although a receive operation continues thereafter, the subsequent received data is not stored in the receive buffer register (receive status bit = "1"). before normal receive operation can be restarted, the receive enable bit must be temporarily cleared to "0". and this is the only way that the overrun error flag can be cleared. ? about dma transfer request generation during sio transmission if the transmit buffer register becomes empty (transmit buffer empty flag = "1") while the transmit enable bit remains set to "1" (transmission enabled), an sio transmit buffer empty dma transfer request is generated. ? about dma transfer request generation during sio reception if the reception finished bit is set to "1" (receive buffer register full), a reception finished dma transfer request is generated. be aware, however, that if an overrun error occurred during reception, this dma transfer re- quest is not generated.
12 12-41 serial i/o 12.6 transmit operation in uart mode 32176 group user?s manual (rev.1.01) figure 12.6.1 example of a transfer data format during uart mode st b7 b6 b5 b4 b3 b2 b1 b0 par sp sp lsb msb st parity bit stop bit start bit data bits (8 bits) transmit data next data 12.6 transmit operation in uart mode 12.6.1 setting the uart baud rate the baud rate (data transfer rate) in uart mode is determined by a transmit/receive shift clock. during uart mode, the source for this transmit/receive shift clock is always the internal clock no matter how the internal/ external clock select bit (sio transmit/receive mode register bit 11) is set. (1) calculating the uart mode baud rate after being divided by a clock divider, f(bclk) is supplied to the baud rate generator (brg), after which it is further divided by 16 to produce a transmit/receive shift clock. the clock divider?s divide-by value is selected from 1, 8, 32 or 256 by using the sio transmit control regis- ter cdiv (baud rate generator count source select) bits (bits 2?3). the baud rate generator divides the clock divider output by (baud rate register set value + 1) and further by 16, thus generating a transmit/receive shift clock. when the internal clock is selected in uart mode, the baud rate is calculated using the equation below. baud rate = f(bclk) [bps] clock divider?s divide-by value x (baud rate register set value + 1) x 16 baud rate register set value = h?00 to h?ff clock divider?s divide-by value = 1, 8, 32 or 256 12.6.2 uart transmit/receive data formats the transmit/receive data format during uart mode is determined by setting the sio transmit/receive mode register. shown below is the transmit/receive data format that can be used in uart mode.
12 12-42 serial i/o 12.6 transmit operation in uart mode 32176 group user?s manual (rev.1.01) table 12.6.1 transfer data in uart mode bit name content st (start bit) indicates the beginning of data transmission. this is a low-level signal of a one bit period, which is added immediately preceding the transmit data. bits 0?8 (character bits) transmit/receive data transferred via serial i/o. in uart mode, 7, 8 or 9 bits of data can be transmitted/received. par (parity bit) added to the transmit/receive character. when parity is enabled, parity is automatically set in such a way that the number of 1?s in the character including the parity bit itself is always even or odd as selected by the even/odd parity select bit. sp (stop bit) indicates the end of data transmission, which is added immediately following the character (or if parity is enabled, immediately following the parity bit). the stop bit can be chosen to be one bit or two bits long. figure 12.6.2 selectable data formats during uart mode st b7 b6 b5 b4 b3 b2 b1 b0 par sp sp st b7 b6 b5 b4 b3 b2 b1 b0 par sp st b7 b6 b5 b4 b3 b2 b1 b0 sp sp st b7 b6 b5 b4 b3 b2 b1 b0 sp lsb msb 8-bit character st b7 b6 b5 b4 b3 b2 b1 sp sp par st b7 b6 b5 b4 b3 b2 b1 sp par st b7 b6 b5 b4 b3 b2 b1 sp sp st b7 b6 b5 b4 b3 b2 b1 sp lsb msb 7-bit character 9-bit character st b7 b6 b5 b4 b3 b2 b1 b0 par sp sp st b7 b6 b5 b4 b3 b2 b1 b0 par sp st b7 b6 b5 b4 b3 b2 b1 b0 sp sp st b7 b6 b5 b4 b3 b2 b1 b0 sp lsb msb b8 b8 b8 b8 bits 0-8: character (data) bits sp: stop bit st: start bit par: parity bit b0 b7 b8 b15 7-bit character 8-bit character 9-bit character sio transmit buffer register sio receive buffer register notes:  the high-order bits of the selected character length in the sio receive buffer register are fixed to "0".  the data bit numbers (bn) above indicate bit numbers in a data list, and not the register bit numbers (bn).
12 12-43 serial i/o 12.6 transmit operation in uart mode 32176 group user?s manual (rev.1.01) 12.6.3 initializing uart transmission to transmit data in uart mode, initialize the serial i/o following the procedure described below. (1) setting sio transmit/receive mode register ? set the register to uart mode. ? set parity (when enabled, select odd/even). ? set the stop bit length. ? set the character length (note 1). note 1: during uart mode, settings of the internal/external clock select bit have no effect (only the internal clock is useful). (2) setting sio transmit control register ? select the clock divider?s divide-by ratio. (3) setting sio baud rate register set a baud rate generator value. (see section 12.6.1, ?setting the uart baud rate.?) (4) setting sio interrupt related registers ? select the source of transmit interrupt request (transmit buffer empty or transmission finished) (sio interrupt request source select register). ? enable or disable sio transmit interrupt requests (sio interrupt request mask register). (5) setting the interrupt controller (sio transmit interrupt control register) to use transmit interrupts, set their priority levels. (6) setting dmac to issue dma transfer requests to the internal dmac when the transmit buffer is empty, set up the dmac. (see chapter 9, ?dmac.?) (7) selecting pin functions because the serial i/o related pins serve dual purposes, set the pin functions for use as sio pins or input/ output ports. (see chapter 8, ?input/output ports and pin functions.?)
12 12-44 serial i/o 12.6 transmit operation in uart mode 32176 group user?s manual (rev.1.01) figure 12.6.3 procedure for initializing uart transmission initialize uart transmission  set the register to uart mode  set parity (when enabled, select odd/even)  set the stop bit length  set the character length set sio transmit/receive mode register (when using dmac) set dmac related registers set the interrupt controller set sio interrupt related registers  divide-by ratio = h'00 to h'ff set sio baud rate register  select the clock divider divide-by ratio set sio transmit control register set the input/output port operation mode register serial i/o related registers end of uart transmit initialization (when using interrupts)  select the source of transmit interrupt request  enable or disable transmit interrupt requests
12 12-45 serial i/o 12.6 transmit operation in uart mode 32176 group user?s manual (rev.1.01) 12.6.4 starting uart transmission the serial i/o starts a transmit operation when all of the following conditions are met after being initialized. ? sio transmit control register ten (transmit enable) bit is set to "1" (note 1). ? transmit data is written to the sio transmit buffer register (transmit buffer empty bit = "0"). note 1: while the transmit enable bit is cleared to "0", writes to the transmit buffer are ignored. always be sure to set the transmit enable bit to "1" before writing to the transmit buffer register. when transmission starts, the serial i/o sends data following the procedure described below. ? transfer the content of the sio transmit buffer register to the sio transmit shift register. ? set the transmit buffer empty bit to "1" (note 2). ? start sending data synchronously with the shift clock beginning with the lsb. note 2: a transmit interrupt request can be generated for reasons that the transmit buffer is empty or transmission has finished. also, a dma transfer request can be generated when the transmit buffer is empty. no dma transfer requests can be generated for reasons that transmission has finished. 12.6.5 successive uart transmission once data has been transferred from the transmit buffer register to the transmit shift register, the next data can be written to the transmit buffer register even when the serial i/o has not finished sending the previous data. if the next data is written to the transmit buffer before transmission has finished, the previous and the next data are transmitted successively. check the sio transmit control register?s transmit buffer empty flag to see if data has been transferred from the transmit buffer register to the transmit shift register. 12.6.6 processing at end of uart transmission when data transmission finishes, the following operation is automatically performed in hardware. (1) when not transmitting successively ? the transmit status bit is cleared to "0". (2) when transmitting successively ? when transmission of the last data in a consecutive data train finishes, the transmit status bit is cleared to "0". 12.6.7 transmit interrupts (1) transmit buffer empty interrupt if the transmit buffer empty interrupt was selected using the sio interrupt request source select register, a transmit buffer empty interrupt request is generated when data has been transferred from the transmit buffer register to the transmit shift register. a transmit buffer empty interrupt request is also generated when the ten (transmit enable) bit is set to "1" (reenabled after being disabled) while the transmit buffer empty interrupt has been enabled.
12 12-46 serial i/o 12.6 transmit operation in uart mode 32176 group user?s manual (rev.1.01) figure 12.6.4 transmit operation during uart mode (hardware processing) the following processing is automatically performed in hardware.  transfer the content of the transmit buffer to the transmit shift register  set the transmit buffer empty bit to "1" transmit dma transfer request transmit interrupt request transmit data y (successive transmission) transmit conditions met ? transmit conditions met ? clear the transmit status bit to "0" y n n (note 1) note 1: this applies when the transmit interrupt was enabled using the sio interrupt request mask register after selectin g the transmit buffer em p t y interru p t with the sio interru p t re q uest source select re g ister. end of uart transmit operation uart transmit operation starts (2) transmission finished interrupt if the transmission finished interrupt was selected using the sio interrupt request source select register, a transmission finished interrupt request is generated when data in the transmit shift register has all been transmitted. the sio interrupt request mask register and the interrupt controller (icu) must be set before these transmit interrupts can be used. 12.6.8 transmit dma transfer request when data has been transferred from the transmit buffer register to the transmit shift register, a transmit dma transfer request for the corresponding sio channel is output to the dmac. a transmit dma transfer request is also output when the ten (transmit enable) bit is set to "1" (disabled
12 12-47 serial i/o 12.6 transmit operation in uart mode 32176 group user?s manual (rev.1.01) 12.6.9 example of uart transmit operation the following shows a typical transmit operation in uart mode. txd rxd transmit enable bit transmit buffer empty bit b0 b6 b7 st sp sp par write to the transmit buffer register transmit status bit txd sio transmit interrupt request (note 1) set cleared : processing by software : interrupt request generated cleared transferred from the transmit buffer to the transmit shift register (transmission starts) set interrupt request accepted (note 4) (note 2)(note 6) (note 3)(note 7) (note 2) (note 5) transmit interrupt request transmit interrupt request transmit interrupt request interrupt request accepted (note 4) (when transmit buffer empty interrupt is selected) (when transmission finished interrupt is selected) note 1: changes of the interrupt controller's sio transmit interrupt control register interrupt request bit note 2: when transmit buffer empty interrupt is enabled (dma transfer can also be requested at the same time) note 3: when transmission finished interrupt is enabled note 4: the interrupt controller's ivect register is read or sio transmit interrupt control register interrupt request bit is c leared. note 5: a transmit interrupt request is generated when transmission is enabled. note 6: be aware that even after transmit data is written to the transmit buffer, a transmit interrupt request is generated whe n the data is transferred from the transmit buffer to the transmit shift register and the transmit buffer is thereby empt ied. note 7: a transmission finished interrupt request is g enerated when data in the transmit shift re g ister has all been transmitted. figure 12.6.5 example of uart transmission (transmitted only once)
12 12-48 serial i/o 12.6 transmit operation in uart mode 32176 group user?s manual (rev.1.01) figure 12.6.6 example of uart transmission (transmitted successively) : processing by software : interrupt request generated set transmit buffer empty bit transmit enable bit cleared transmit status bit transferred from the transmit buffer to the transmit shift register (transmission starts) txd sio transmit interrupt request (note 1) (first data) (next data) write to the transmit buffer register first data next data is written upon transmit interrupt (note 5) (note 2) (note 2) txd rxd st b7 b0 st sp b7 b0 sp cleared when transfer of the last data is completed interrupt request accepted (note 4) next data (note 2)(note 6) (note 3) (note 3)(note 7) interrupt request accepted (note 4) (when transmit buffer empty interrupt is selected) (when transmission finished interrupt is selected) write to the transmit buffer register note 1: changes of the interrupt controller's sio transmit interrupt control register interrupt request bit note 2: when transmit buffer empty interrupt is enabled (dma transfer can also be requested at the same time) note 3: when transmission finished interrupt is enabled note 4: the interrupt controller's ivect register is read or sio transmit interrupt control register interrupt request bit is c leared. note 5: a transmit interrupt request is generated when transmission is enabled. note 6: be aware that even after transmit data is written to the transmit buffer, a transmit interrupt request is generated whe n the data is transferred from the transmit buffer to the transmit shift register and the transmit buffer is thereby empt ied. note 7: a transmission finished interru p t re q uest is g enerated when data in the transmit shift re g ister has all been transmitted.
12 12-49 serial i/o 12.7 receive operation in uart mode 32176 group user?s manual (rev.1.01) 12.7 receive operation in uart mode 12.7.1 initialization for uart reception to receive data in uart mode, initialize the serial i/o following the procedure described below. (1) setting sio transmit/receive mode register ? set the register to uart mode. ? set parity (when enabled, select odd/even). ? set the stop bit length. ? set the character length. note: ? during uart mode, settings of the internal/external clock select bit have no effect (only the internal clock is useful). (2) setting sio transmit control register ? set the clock divider?s divide-by ratio. (3) setting sio baud rate register set a baud rate generator value. (see section 12.6.1, ?setting the uart baud rate.?) (4) setting sio interrupt related registers ? select the source of receive interrupt request (reception finished or receive error) (interrupt request source select register). ? enable or disable receive interrupts (interrupt request mask register). (5) setting the interrupt controller to use receive interrupt, set their priority levels. (6) setting dmac to issue dma transfer requests to the internal dmac when reception has finished, set up the dmac. (see chapter 9, ?dmac.?) (7) selecting pin functions because the serial i/o related pins serve dual purposes, set the pin functions for use as sio pins or input/ output ports. (see chapter 8, ?input/output ports and pin functions.?)
12 12-50 serial i/o 12.7 receive operation in uart mode 32176 group user?s manual (rev.1.01) figure 12.7.1 procedure for initializing uart reception initialize uart reception  set the register to uart mode  set parity (when enabled, select odd/even)  set the stop bit length  set the character length set sio transmit/receive mode register (when using dmac) set dmac related registers set the interrupt controller's sio receive interrupt control register set sio interrupt related registers  select the source of receive interrupt request  enable or disable receive interrupt requests set sio baud rate register  select the clock divider divide-by ratio set sio transmit control register serial i/o related registers end of uart receive initialization (when using interrupts)  divide-by ratio = h'00 to h'ff set the input/output port operation mode register
12 12-51 serial i/o 12.7 receive operation in uart mode 32176 group user?s manual (rev.1.01) 12.7.2 starting uart reception the serial i/o starts receive operation when all of the following conditions are met after being initialized. ? sio receive control register receive enable bit is set to "1" ? start bit (falling edge signal) is applied to the rxd pin when the above conditions are met, the serial i/o enters uart receive operation. however, the start bit is checked again at the first rise of the internal receive shift clock and if it is detected high for reasons of noise, etc., the serial i/o stops receive operation and waits for the start bit again. 12.7.3 processing at end of uart reception when data reception finishes, the following operation is automatically performed in hardware. (1) when reception is completed normally the reception finished (receive buffer full) bit is set to "1". notes: ? an interrupt request is generated if the reception finished (receive buffer full) interrupt has been enabled. ? a dma transfer request is generated. (2) when a receive error occurred if an error occurred, the corresponding error bit (oe, fe or pe) and the receive error sum bit are set to "1". notes: ? if the reception finished interrupt has been selected (by sio receive interrupt request source select register), a reception finished interrupt request is generated when interrupt requests are enabled. however, this does not apply when the detected error is an overrun error, in which case no reception finished interrupt requests are generated. ? if the receive error interrupt has been selected (by sio receive interrupt request source select register), a receive error interrupt request is generated when interrupt requests are enabled. ? no dma transfer requests are generated.
12 12-52 serial i/o 12.7 receive operation in uart mode 32176 group user?s manual (rev.1.01) figure 12.7.2 receive operation during uart mode (hardware processing) the following processing is automatically performed in hardware. receive data y y n transfer data from the sio receive shift register to the sio receive buffer register set the sio receive control register reception finished bit to "1" set the receive status bit to "1" overrun error ? parity error or framing error ? receive conditions met ? start bit detected normally ? n set the sio receive control register overrun error bit and error sum bit to "1" set the sio receive control register's corresponding error bit and receive error sum bit to "1" n uart receive operation starts end of uart reception y n y
12 12-53 serial i/o 12.7 receive operation in uart mode 32176 group user?s manual (rev.1.01) 12.7.4 example of uart receive operation the following shows a typical receive operation in uart mode. figure 12.7.3 example of uart reception (when received normally) txd rxd note 1: changes of the interrupt controller's sio receive interrupt control register interrupt request bit note 2: when reception finished interrupt is enabled (dma transfer can also be requested at the same time) note 3: the interrupt controller's ivect register is read or sio receive interrupt control register interrupt re q uest bit is cleared receive enable bit (sio receive control register) b0 b6 b7 st sp sp par reception finished bit rxd set cleared : processing by software : interrupt request generated internal clock selected read from the receive buffer reception finished interrupt request (note 2) interrupt request accepted (note 3) receive status bit automatically cleared for each receive operation performed sio receive interrupt request (note 1) (when reception finished interrupt is selected) (when receive error interrupt is selected) no interrupt request
12 12-54 serial i/o 12.7 receive operation in uart mode 32176 group user?s manual (rev.1.01) figure 12.7.4 example of uart reception (when overrun error occurred) txd rxd note 1: changes of the interrupt controller's sio receive interrupt control register interrupt request bit note 2: when reception finished interrupt is enabled note 3: when receive error interrupt is enabled note 4: this is done by clearing the receive enable bit to "0". note 5: the interrupt controller's ivect register is read or sio receive interrupt control register interrupt request bit is cleared receive enable bit b7 st sp sp reception finished bit rxd set : processing by software : interrupt request generated st b7 receive buffer not read during this interval first data reception completed next data reception completed (note 5) overrun error bit cleared (note 4) overrun error bit set sio receive interrupt request (note 1) (when reception finished interrupt is selected) reception finished interrupt request interrupt request accepted (note 5) receive error interrupt request (note 3) interrupt request accepted (note 5) (when receive error interrupt is selected) (sio receive control register) (note 2)
12 12-55 serial i/o 12.7 receive operation in uart mode 32176 group user?s manual (rev.1.01) figure 12.7.7 delay in receive timing 12.7.5 start bit detection during uart reception the start bit is sampled synchronously with the internal brg output. if the received signal remains low for 8 brg output cycles after the falling edge of the start bit, the cpu recognizes that part of the received signal as the start bit and starts latching the received data another 8 cycles after that, beginning with the lsb (first bit). if some sampled part of the received signal is high before being determined to be the start bit, the cpu starts detecting the falling edge of the received signal again. because the start bit is sampled synchronously with the internal brg output, there is a delay equivalent to one brg output cycle at maximum. the subsequent received data is latched into the internal circuit with that delayed timing. figure 12.7.5 start bit detection figure 12.7.6 example of an invalid start bit (not received) internal brg output rxd lsb data 16 cycles 8 cycles 8 cycles note:  this dia g ram does not show detailed timin g information. internal brg output rxd 8 cycles note:  this dia g ram does not show detailed timin g information. internal rxd internal brg output rxd delay equivalent to one brg output cycle at maximum
12 12-56 serial i/o 32176 group user?s manual (rev.1.01) 12.8 fixed period clock output function when using sio0 or sio1 in uart mode, the relevant port (p84 or p87) can be switched for use as an sclko0 or sclko1 pin, respectively. that way, a brg output clock divided by 2 can be output from the sclko pin. note: ? this clock is output not just during data transfer. 12.8 fixed period clock output function figure 12.8.1 example of fixed period clock output sclko txd rxd clock output to peripheral circuits uart transmission/reception st sp data st sp data 50% 50% brg period internal brg output sclko output 1. configuration when using brg/2 clock 2. operation timing
12 12-57 serial i/o 32176 group user?s manual (rev.1.01) 12.9 precautions on using uart mode ? settings of sio transmit/receive mode register and sio baud rate register the sio transmit/receive mode register and sio baud rate register and the transmit control register?s brg count source select bit must always be set when the serial i/o is not operating. if a transmit or receive operation is in progress, wait until the transmit and receive operations are finished and then clear the transmit and receive enable bits before making changes. ? settings of brg (baud rate register) writes to the sio baud rate register take effect in the next cycle after the brg counter has finished counting. however, if the register is accessed for write while transmission and reception are disabled, the written value takes effect at the same time it is written. ? transmission/reception using dma to transmit/receive data in dma request mode, enable the dmac to accept transfer requests (by setting the dma mode register) before serial communication starts. ? about overrun error if all bits of the next received data have been set in the sio receive shift register before reading out the sio receive buffer register (i.e., an overrun error occurred), the received data is not stored in the receive buffer register, with the previous received data retained in it. once an overrun error occurs, although a receive operation continues, the subsequent received data is not stored in the receive buffer register. before normal receive operation can be restarted, the receive enable bit must be temporarily cleared. and this is the only way that the overrun error flag can be cleared. ? flags showing the status of uart receive operation there are following flags that indicate the status of receive operation during uart mode: ? sio receive control register receive status bit ? sio receive control register reception finished bit ? sio receive control register receive error sum bit ? sio receive control register overrun error bit ? sio receive control register parity error bit ? sio receive control register framing error bit the manner in which the reception finished bit and various error flags are cleared differs depending on whether an overrun error occurred, as described below. [when an overrun error did not occur] cleared by reading out the lower byte of the receive buffer register or by clearing the receive enable bit. [when an overrun error occurred] cleared by only clearing the receive enable bit. 12.9 precautions on using uart mode
12 12-58 serial i/o 32176 group user?s manual (rev.1.01) 12.9 precautions on using uart mode this page is blank for reasons of layout.
chapter 13 can module 13.1 outline of the can module 13.2 can module related registers 13.3 can protocol 13.4 initializing the can module 13.5 transmitting data frames 13.6 receiving data frames 13.7 transmitting remote frames 13.8 receiving remote frames 13.9 precautions about can module
13 13-2 32176 group user?s manual (rev.1.01) can module 13.1 outline of the can module the 32176 contains two-channel full can modules compliant with can (controller area network) specification v2.0 b active. these can modules each have 16 message slots and three mask registers, effective use of which helps to reduce the data processing load of the cpu. the can modules are outlined below. table 13.1.1 outline of the can module item description protocol can specification v2.0 b active number of message slots total 16 slots (14 global slots, two local slots) polarity 0: dominant 1: recessive acceptance filter global mask: 1 (function to receive only a range local mask: 2 of ids specified by receive id filter) baud rate 1 time quantum (tq) = (brp + 1) / cpu clock (brp: baud rate prescaler set value) baud rate = 1 ..... max 1 mbps (note 1) tq period 13.1 outline of the can module table 13.1.2 dma transfer requests generated by can dma transfer request by can dmac input channel can0: slot 0 transmission failed or slot 15 transmit/receive operation finished dma6 can0: slot 1 transmission failed or slot 14 transmit/receive operation finished dma7 can1: slot 0 transmission failed or slot 15 transmit/receive operation finished dma8 can1: slot 1 transmission failed or slot 14 transmit/receive operation finished dma9
13-3 13 32176 group user?s manual (rev.1.01) can module table 13.1.3 interrupt requests generated by can modules can module interrupt request source icu interrupt request source can0 transmission completed can0 transmit/receive & error interrupt can1 transmission completed can1 transmit/receive & error interrupt can0 reception completed can0 transmit/receive & error interrupt can1 reception completed can1 transmit/receive & error interrupt can0 bus error can0 transmit/receive & error interrupt can1 bus error can1 transmit/receive & error interrupt can0 error passive can0 transmit/receive & error interrupt can1 error passive can1 transmit/receive & error interrupt can0 bus off can0 transmit/receive & error interrupt can1 bus off can1 transmit/receive & error interrupt can0 single shot can0 transmit/receive & error interrupt can1 single shot can1 transmit/receive & error interrupt acceptance filter self- diagnosis control baud rate prescaler cpuclk message slot 16 transmit/receive completed, error or single shot dma6,7 can0 internal data bus interrupt ctx0 crx0 dam request can protocol controller acceptance filter self- diagnosis control baud rate prescaler cpuclk message slot 16 transmit/receive completed, error or single shot can1 interrupt ctx1 crx1 can protocol controller dma8,9 dam request figure 13.1.1 block diagram of the can modules 13.1 outline of the can module
13 13-4 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers 13.2 can module related registers shown below is a can module related register map. can module related register map (1/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 1000 can0 control register 13-15 (can0cnt) h'0080 1002 can0 status register 13-18 (can0stat) h'0080 1004 can0 extended id register 13-21 (can0extid) h'0080 1006 can0 configuration register 13-22 (can0conf) h'0080 1008 can0 timestamp count register 13-24 (can0tstmp) h'0080 100a can0 receive error count register can0 transmit error count register 13-25 (can0rec) (can0tec) h'0080 100c can0 slot interrupt request status register 13-29 (can0slist) h'0080 100e (use inhibited area) h'0080 1010 can0 slot interrupt request mask register 13-30 (can0slimk) h'0080 1012 (use inhibited area) h'0080 1014 can0 error interrupt request status register can0 erro r interrupt request mask register 13-31 (can0erist) (can0erimk) 13-32 h'0080 1016 can0 baud rate prescaler can0 cause of error register 13-26 (can0brp) (can0ef) 13-45 h'0080 1018 can0 mode register can0 dma transfer request select register 13-47 (can0mod) (can0dmarq) 13-48 (use inhibited area) h'0080 1028 can0 global mask register standard id0 can0 global mask register standard id1 13-49 (c0gmsks0) (c0gmsks1) h'0080 102a can0 global mask register extended id0 can0 global mask register extended id1 13-50 (c0gmske0) (c0gmske1) h'0080 102c can0 global mask register extended id2 (use inhibited area) 13-51 (c0gmske2) h'0080 102e (use inhibited area) h'0080 1030 can0 local mask register a standard id0 can0 local mask register a standard id1 13-49 (c0lmskas0) (c0lmskas1) h'0080 1032 can0 local mask register a extended id0 can0 local mask register a extended id1 13-50 (c0lmskae0) (c0lmskae1) h'0080 1034 can0 local mask register a extended id2 (use inhibited area) 13-51 (c0lmskae2) h'0080 1036 (use inhibited area) h'0080 1038 can0 local mask register b standard id0 can0 local mask register b standard id1 13-49 (c0lmskbs0) (c0lmskbs1) h'0080 103a can0 local mask register b extended id0 can0 local mask register b extended id1 13-50 (c0lmskbe0) (c0lmskbe1) h'0080 103c can0 local mask register b extended id2 (use inhibited area) 13-51 (c0lmskbe2) h'0080 103e (use inhibited area) h'0080 1040 can0 single-shot mode control register 13-53 (can0ssmode) h'0080 1042 (use inhibited area) h'0080 1044 can0 single-shot interrupt request status register 13-33 (can0ssist) h'0080 1046 (use inhibited area) |
13-5 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can module related register map (2/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 1048 can0 single-shot interrupt request mask register 13-34 (can0ssimk) | (use inhibited area) h'0080 1050 can0 message slot 0 control register can0 message slot 1 control register 13-54 (c0msl0cnt) (c0msl1cnt) h'0080 1052 can0 message slot 2 control register can0 message slot 3 control register 13-54 (c0msl2cnt) (c0msl3cnt) h'0080 1054 can0 message slot 4 control register can0 message slot 5 control register 13-54 (c0msl4cnt) (c0msl5cnt) h'0080 1056 can0 message slot 6 control register can0 message slot 7 control register 13-54 (c0msl6cnt) (c0msl7cnt) h'0080 1058 can0 message slot 8 control register can0 message slot 9 control register 13-54 (c0msl8cnt) (c0msl9cnt) h'0080 105a can0 message slot 10 control register can0 message slot 11 control register 13-54 (c0msl10cnt) (c0msl11cnt) h'0080 105c can0 message slot 12 control register can0 message slot 13 control register 13-54 (c0msl12cnt) (c0msl13cnt) h'0080 105e can0 message slot 14 control register can0 message slot 15 control register 13-54 (c0msl14cnt) (c0msl15cnt) (use inhibited area) h'0080 1100 can0 message slot 0 standard id0 can0 message slot 0 standard id1 13-58 (c0msl0sid0) (c0msl0sid1) 13-59 h'0080 1102 can0 message slot 0 extended id0 can0 message slot 0 extended id1 13-60 (c0msl0eid0) (c0msl0eid1) 13-61 h'0080 1104 can0 message slot 0 extended id2 can0 message slot 0 data length register 13-62 (c0msl0eid2) (c0msl0dlc) 13-63 h'0080 1106 can0 message slot 0 data 0 can0 message slot 0 data 1 13-64 (c0msl0dt0) (c0msl0dt1) 13-65 h'0080 1108 can0 message slot 0 data 2 can0 message slot 0 data 3 13-66 (c0msl0dt2) (c0msl0dt3) 13-67 h'0080 110a can0 message slot 0 data 4 can0 message slot 0 data 5 13-68 (c0msl0dt4) (c0msl0dt5) 13-69 h'0080 110c can0 message slot 0 data 6 can0 message slot 0 data 7 13-70 (c0msl0dt6) (c0msl0dt7) 13-71 h'0080 110e can0 message slot 0 timestamp 13-72 (c0msl0tsp) h'0080 1110 can0 message slot 1 standard id0 can0 message slot 1 standard id1 13-58 (c0msl1sid0) (c0msl1sid1) 13-59 h'0080 1112 can0 message slot 1 extended id0 can0 message slot 1 extended id1 13-60 (c0msl1eid0) (c0msl1eid1) 13-61 h'0080 1114 can0 message slot 1 extended id2 can0 message slot 1 data length register 13-62 (c0msl1eid2) (c0msl1dlc) 13-63 h'0080 1116 can0 message slot 1 data 0 can0 message slot 1 data 1 13-64 (c0msl1dt0) (c0msl1dt1) 13-65 h'0080 1118 can0 message slot 1 data 2 can0 message slot 1 data 3 13-66 (c0msl1dt2) (c0msl1dt3) 13-67 h'0080 111a can0 message slot 1 data 4 can0 message slot 1 data 5 13-68 (c0msl1dt4) (c0msl1dt5) 13-69 h'0080 111c can0 message slot 1 data 6 can0 message slot 1 data 7 13-70 (c0msl1dt6) (c0msl1dt7) 13-71 h'0080 111e can0 message slot 1 timestamp 13-72 (c0msl1tsp) h'0080 1120 can0 message slot 2 standard id0 can0 message slot 2 standard id1 13-58 (c0msl2sid0) (c0msl2sid1) 13-59 h'0080 1122 can0 message slot 2 extended id0 can0 message slot 2 extended id1 13-60 (c0msl2eid0) (c0msl2eid1) 13-61 h'0080 1124 can0 message slot 2 extended id2 can0 message slot 2 data length register 13-62 (c0msl2eid2) (c0msl2dlc) 13-63 h'0080 1126 can0 message slot 2 data 0 can0 message slot 2 data 1 13-64 (c0msl2dt0) (c0msl2dt1) 13-65 h'0080 1128 can0 message slot 2 data 2 can0 message slot 2 data 3 13-66 (c0msl2dt2) (c0msl2dt3) 13-67 h'0080 112a can0 message slot 2 data 4 can0 message slot 2 data 5 13-68 (c0msl2dt4) (c0msl2dt5) 13-69 h'0080 112c can0 message slot 2 data 6 can0 message slot 2 data 7 13-70 (c0msl2dt6) (c0msl2dt7) 13-71 h'0080 112e can0 message slot 2 timestamp 13-72 (c0msl2tsp) |
13 13-6 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can module related register map (3/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 1130 can0 message slot 3 standard id0 can0 message slot 3 standard id1 13-58 (c0msl3sid0) (c0msl3sid1) 13-59 h'0080 1132 can0 message slot 3 extended id0 can0 message slot 3 extended id1 13-60 (c0msl3eid0) (c0msl3eid1) 13-61 h'0080 1134 can0 message slot 3 extended id2 can0 message slot 3 data length register 13-62 (c0msl3eid2) (c0msl3dlc) 13-63 h'0080 1136 can0 message slot 3 data 0 can0 message slot 3 data 1 13-64 (c0msl3dt0) (c0msl3dt1) 13-65 h'0080 1138 can0 message slot 3 data 2 can0 message slot 3 data 3 13-66 (c0msl3dt2) (c0msl3dt3) 13-67 h'0080 113a can0 message slot 3 data 4 can0 message slot 3 data 5 13-68 (c0msl3dt4) (c0msl3dt5) 13-69 h'0080 113c can0 message slot 3 data 6 can0 message slot 3 data 7 13-70 (c0msl3dt6) (c0msl3dt7) 13-71 h'0080 113e can0 message slot 3 timestamp 13-72 (c0msl3tsp) h'0080 1140 can0 message slot 4 standard id0 can0 message slot 4 standard id1 13-58 (c0msl4sid0) (c0msl4sid1) 13-59 h'0080 1142 can0 message slot 4 extended id0 can0 message slot 4 extended id1 13-60 (c0msl4eid0) (c0msl4eid1) 13-61 h'0080 1144 can0 message slot 4 extended id2 can0 message slot 4 data length register 13-62 (c0msl4eid2) (c0msl4dlc) 13-63 h'0080 1146 can0 message slot 4 data 0 can0 message slot 4 data 1 13-64 (c0msl4dt0) (c0msl4dt1) 13-65 h'0080 1148 can0 message slot 4 data 2 can0 message slot 4 data 3 13-66 (c0msl4dt2) (c0msl4dt3) 13-67 h'0080 114a can0 message slot 4 data 4 can0 message slot 4 data 5 13-68 (c0msl4dt4) (c0msl4dt5) 13-69 h'0080 114c can0 message slot 4 data 6 can0 message slot 4 data 7 13-70 (c0msl4dt6) (c0msl4dt7) 13-71 h'0080 114e can0 message slot 4 timestamp 13-72 (c0msl4tsp) h'0080 1150 can0 message slot 5 standard id0 can0 message slot 5 standard id1 13-58 (c0msl5sid0) (c0msl5sid1) 13-59 h'0080 1152 can0 message slot 5 extended id0 can0 message slot 5 extended id1 13-60 (c0msl5eid0) (c0msl5eid1) 13-61 h'0080 1154 can0 message slot 5 extended id2 can0 message slot 5 data length register 13-62 (c0msl5eid2) (c0msl5dlc) 13-63 h'0080 1156 can0 message slot 5 data 0 can0 message slot 5 data 1 13-64 (c0msl5dt0) (c0msl5dt1) 13-65 h'0080 1158 can0 message slot 5 data 2 can0 message slot 5 data 3 13-66 (c0msl5dt2) (c0msl5dt3) 13-67 h'0080 115a can0 message slot 5 data 4 can0 message slot 5 data 5 13-68 (c0msl5dt4) (c0msl5dt5) 13-69 h'0080 115c can0 message slot 5 data 6 can0 message slot 5 data 7 13-70 (c0msl5dt6) (c0msl5dt7) 13-71 h'0080 115e can0 message slot 5 timestamp 13-72 (c0msl5tsp) h'0080 1160 can0 message slot 6 standard id0 can0 message slot 6 standard id1 13-58 (c0msl6sid0) (c0msl6sid1) 13-59 h'0080 1162 can0 message slot 6 extended id0 can0 message slot 6 extended id1 13-60 (c0msl6eid0) (c0msl6eid1) 13-61 h'0080 1164 can0 message slot 6 extended id2 can0 message slot 6 data length register 13-62 (c0msl6eid2) (c0msl6dlc) 13-63 h'0080 1166 can0 message slot 6 data 0 can0 message slot 6 data 1 13-64 (c0msl6dt0) (c0msl6dt1) 13-65 h'0080 1168 can0 message slot 6 data 2 can0 message slot 6 data 3 13-66 (c0msl6dt2) (c0msl6dt3) 13-67 h'0080 116a can0 message slot 6 data 4 can0 message slot 6 data 5 13-68 (c0msl6dt4) (c0msl6dt5) 13-69 h'0080 116c can0 message slot 6 data 6 can0 message slot 6 data 7 13-70 (c0msl6dt6) (c0msl6dt7) 13-71 h'0080 116e can0 message slot 6 timestamp 13-72 (c0msl6tsp)
13-7 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can module related register map (4/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 1170 can0 message slot 7 standard id0 can0 message slot 7 standard id1 13-58 (c0msl7sid0) (c0msl7sid1) 13-59 h'0080 1172 can0 message slot 7 extended id0 can0 message slot 7 extended id1 13-60 (c0msl7eid0) (c0msl7eid1) 13-61 h'0080 1174 can0 message slot 7 extended id2 can0 message slot 7 data length register 13-62 (c0msl7eid2) (c0msl7dlc) 13-63 h'0080 1176 can0 message slot 7 data 0 can0 message slot 7 data 1 13-64 (c0msl7dt0) (c0msl7dt1) 13-65 h'0080 1178 can0 message slot 7 data 2 can0 message slot 7 data 3 13-66 (c0msl7dt2) (c0msl7dt3) 13-67 h'0080 117a can0 message slot 7 data 4 can0 message slot 7 data 5 13-68 (c0msl7dt4) (c0msl7dt5) 13-69 h'0080 117c can0 message slot 7 data 6 can0 message slot 7 data 7 13-70 (c0msl7dt6) (c0msl7dt7) 13-71 h'0080 117e can0 message slot 7 timestamp 13-72 (c0msl7tsp) h'0080 1180 can0 message slot 8 standard id0 can0 message slot 8 standard id1 13-58 (c0msl8sid0) (c0msl8sid1) 13-59 h'0080 1182 can0 message slot 8 extended id0 can0 message slot 8 extended id1 13-60 (c0msl8eid0) (c0msl8eid1) 13-61 h'0080 1184 can0 message slot 8 extended id2 can0 message slot 8 data length register 13-62 (c0msl8eid2) (c0msl8dlc) 13-63 h'0080 1186 can0 message slot 8 data 0 can0 message slot 8 data 1 13-64 (c0msl8dt0) (c0msl8dt1) 13-65 h'0080 1188 can0 message slot 8 data 2 can0 message slot 8 data 3 13-66 (c0msl8dt2) (c0msl8dt3) 13-67 h'0080 118a can0 message slot 8 data 4 can0 message slot 8 data 5 13-68 (c0msl8dt4) (c0msl8dt5) 13-69 h'0080 118c can0 message slot 8 data 6 can0 message slot 8 data 7 13-70 (c0msl8dt6) (c0msl8dt7) 13-71 h'0080 118e can0 message slot 8 timestamp 13-72 (c0msl8tsp) h'0080 1190 can0 message slot 9 standard id0 can0 message slot 9 standard id1 13-58 (c0msl9sid0) (c0msl9sid1) 13-59 h'0080 1192 can0 message slot 9 extended id0 can0 message slot 9 extended id1 13-60 (c0msl9eid0) (c0msl9eid1) 13-61 h'0080 1194 can0 message slot 9 extended id2 can0 message slot 9 data length register 13-62 (c0msl9eid2) (c0msl9dlc) 13-63 h'0080 1196 can0 message slot 9 data 0 can0 message slot 9 data 1 13-64 (c0msl9dt0) (c0msl9dt1) 13-65 h'0080 1198 can0 message slot 9 data 2 can0 message slot 9 data 3 13-66 (c0msl9dt2) (c0msl9dt3) 13-67 h'0080 119a can0 message slot 9 data 4 can0 message slot 9 data 5 13-68 (c0msl9dt4) (c0msl9dt5) 13-69 h'0080 119c can0 message slot 9 data 6 can0 message slot 9 data 7 13-70 (c0msl9dt6) (c0msl9dt7) 13-71 h'0080 119e can0 message slot 9 timestamp 13-72 (c0msl9tsp) h'0080 11a0 can0 message slot 10 standard id0 can0 message slot 10 standard id1 13-58 (c0msl10sid0) (c0msl10sid1) 13-59 h'0080 11a2 can0 message slot 10 extended id0 can0 message slot 10 extended id1 13-60 (c0msl10eid0) (c0msl10eid1) 13-61 h'0080 11a4 can0 message slot 10 extended id2 can0 message slot 10 data length register 13-62 (c0msl10eid2) (c0msl10dlc) 13-63 h'0080 11a6 can0 message slot 10 data 0 can0 message slot 10 data 1 13-64 (c0msl10dt0) (c0msl10dt1) 13-65 h'0080 11a8 can0 message slot 10 data 2 can0 message slot 10 data 3 13-66 (c0msl10dt2) (c0msl10dt3) 13-67 h'0080 11aa can0 message slot 10 data 4 can0 message slot 10 data 5 13-68 (c0msl10dt4) (c0msl10dt5) 13-69 h'0080 11ac can0 message slot 10 data 6 can0 message slot 10 data 7 13-70 (c0msl10dt6) (c0msl10dt7) 13-71 h'0080 11ae can0 message slot 10 timestamp 13-72 (c0msl10tsp)
13 13-8 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can module related register map (5/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 11b0 can0 message slot 11 standard id0 can0 message slot 11 standard id1 13-58 (c0msl11sid0) (c0msl11sid1) 13-59 h'0080 11b2 can0 message slot 11 extended id0 can0 message slot 11 extended id1 13-60 (c0msl11eid0) (c0msl11eid1) 13-61 h'0080 11b4 can0 message slot 11 extended id2 can0 message slot 11 data length register 13-62 (c0msl11eid2) (c0msl11dlc) 13-63 h'0080 11b6 can0 message slot 11 data 0 can0 message slot 11 data 1 13-64 (c0msl11dt0) (c0msl11dt1) 13-65 h'0080 11b8 can0 message slot 11 data 2 can0 message slot 11 data 3 13-66 (c0msl11dt2) (c0msl11dt3) 13-67 h'0080 11ba can0 message slot 11 data 4 can0 message slot 11 data 5 13-68 (c0msl11dt4) (c0msl11dt5) 13-69 h'0080 11bc can0 message slot 11 data 6 can0 message slot 11 data 7 13-70 (c0msl11dt6) (c0msl11dt7) 13-71 h'0080 11be can0 message slot 11 timestamp 13-72 (c0msl11tsp) h'0080 11c0 can0 message slot 12 standard id0 can0 message slot 12 standard id1 13-58 (c0msl12sid0) (c0msl12sid1) 13-59 h'0080 11c2 can0 message slot 12 extended id0 can0 message slot 12 extended id1 13-60 (c0msl12eid0) (c0msl12eid1) 13-61 h'0080 11c4 can0 message slot 12 extended id2 can0 message slot 12 data length register 13-62 (c0msl12eid2) (c0msl12dlc) 13-63 h'0080 11c6 can0 message slot 12 data 0 can0 message slot 12 data 1 13-64 (c0msl12dt0) (c0msl12dt1) 13-65 h'0080 11c8 can0 message slot 12 data 2 can0 message slot 12 data 3 13-66 (c0msl12dt2) (c0msl12dt3) 13-67 h'0080 11ca can0 message slot 12 data 4 can0 message slot 12 data 5 13-68 (c0msl12dt4) (c0msl12dt5) 13-69 h'0080 11cc can0 message slot 12 data 6 can0 message slot 12 data 7 13-70 (c0msl12dt6) (c0msl12dt7) 13-71 h'0080 11ce can0 message slot 12 timestamp 13-72 (c0msl12tsp) h'0080 11d0 can0 message slot 13 standard id0 can0 message slot 13 standard id1 13-58 (c0msl13sid0) (c0msl13sid1) 13-59 h'0080 11d2 can0 message slot 13 extended id0 can0 message slot 13 extended id1 13-60 (c0msl13eid0) (c0msl13eid1) 13-61 h'0080 11d4 can0 message slot 13 extended id2 can0 message slot 13 data length register 13-62 (c0msl13eid2) (c0msl13dlc) 13-63 h'0080 11d6 can0 message slot 13 data 0 can0 message slot 13 data 1 13-64 (c0msl13dt0) (c0msl13dt1) 13-65 h'0080 11d8 can0 message slot 13 data 2 can0 message slot 13 data 3 13-66 (c0msl13dt2) (c0msl13dt3) 13-67 h'0080 11da can0 message slot 13 data 4 can0 message slot 13 data 5 13-68 (c0msl13dt4) (c0msl13dt5) 13-69 h'0080 11dc can0 message slot 13 data 6 can0 message slot 13 data 7 13-70 (c0msl13dt6) (c0msl13dt7) 13-71 h'0080 11de can0 message slot 13 timestamp 13-72 (c0msl13tsp) h'0080 11e0 can0 message slot 14 standard id0 can0 message slot 14 standard id1 13-58 (c0msl14sid0) (c0msl14sid1) 13-59 h'0080 11e2 can0 message slot 14 extended id0 can0 message slot 14 extended id1 13-60 (c0msl14eid0) (c0msl14eid1) 13-61 h'0080 11e4 can0 message slot 14 extended id2 can0 message slot 14 data length register 13-62 (c0msl14eid2) (c0msl14dlc) 13-63 h'0080 11e6 can0 message slot 14 data 0 can0 message slot 14 data 1 13-64 (c0msl14dt0) (c0msl14dt1) 13-65 h'0080 11e8 can0 message slot 14 data 2 can0 message slot 14 data 3 13-66 (c0msl14dt2) (c0msl14dt3) 13-67 h'0080 11ea can0 message slot 14 data 4 can0 message slot 14 data 5 13-68 (c0msl14dt4) (c0msl14dt5) 13-69 h'0080 11ec can0 message slot 14 data 6 can0 message slot 14 data 7 13-70 (c0msl14dt6) (c0msl14dt7) 13-71 h'0080 11ee can0 message slot 14 timestamp 13-72 (c0msl14tsp)
13-9 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can module related register map (6/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 11f0 can0 message slot 15 standard id0 can0 message slot 15 standard id1 13-58 (c0msl15sid0) (c0msl15sid1) 13-59 h'0080 11f2 can0 message slot 15 extended id0 can0 message slot 15 extended id1 13-60 (c0msl15eid0) (c0msl15eid1) 13-61 h'0080 11f4 can0 message slot 15 extended id2 can0 message slot 15 data length register 13-62 (c0msl15eid2) (c0msl15dlc) 13-63 h'0080 11f6 can0 message slot 15 data 0 can0 message slot 15 data 1 13-64 (c0msl15dt0) (c0msl15dt1) 13-65 h'0080 11f8 can0 message slot 15 data 2 can0 message slot 15 data 3 13-66 (c0msl15dt2) (c0msl15dt3) 13-67 h'0080 11fa can0 message slot 15 data 4 can0 message slot 15 data 5 13-68 (c0msl15dt4) (c0msl15dt5) 13-69 h'0080 11fc can0 message slot 15 data 6 can0 message slot 15 data 7 13-70 (c0msl15dt6) (c0msl15dt7) 13-71 h'0080 11fe can0 message slot 15 timestamp 13-72 (c0msl15tsp) (use inhibited area) h'0080 1400 can1 control register 13-15 (can1cnt) h'0080 1402 can1 status register 13-18 (can1stat) h'0080 1404 can1 extended id register 13-21 (can1extid) h'0080 1406 can1 configuration register 13-22 (can1conf) h'0080 1408 can1 timestamp count register 13-24 (can1tstmp) h'0080 140a can1 receive error count register can1 transmit error count register 13-25 (can1rec) (can1tec) h'0080 140c can1 slot interrupt request status register 13-29 (can1slist) h'0080 140e (use inhibited area) h'0080 1410 can1 slot interrupt request mask register 13-30 (can1slimk) h'0080 1412 (use inhibited area) h'0080 1414 can1 error interrupt request status register can1 e rror interrupt request mask register 13-31 (can1erist) (can1erimk) 13-32 h'0080 1416 can1 baud rate prescaler can1 cause of error register 13-26 (can1brp) (can1ef) 13-45 h'0080 1418 can1 mode register can1 dma transfer request select register 13-47 (can1mod) (can1dmarq) 13-48 (use inhibited area) h'0080 1428 can1 global mask register standard id0 can1 global mask register standard id1 13-49 (c1gmsks0) (c1gmsks1) h'0080 142a can1 global mask register extended id0 can1 global mask register extended id1 13-50 (c1gmske0) (c1gmske1) h'0080 142c can1 global mask register extended id2 (use inhibited area) 13-51 (c1gmske2) h'0080 142e (use inhibited area) h'0080 1430 can1 local mask register a standard id0 can1 local mask register a standard id1 13-49 (c1lmskas0) (c1lmskas1) h'0080 1432 can1 local mask register a extended id0 can1 local mask register a extended id1 13-50 (c1lmskae0) (c1lmskae1) h'0080 1434 can1 local mask register a extended id2 (use inhibited area) 13-51 (c1lmskae2) h'0080 1436 (use inhibited area) h'0080 1438 can1 local mask register b standard id0 can1 local mask register b standard id1 13-49 (c1lmskbs0) (c1lmskbs1) h'0080 143a can1 local mask register b extended id0 can1 local mask register b extended id1 13-50 (c1lmskbe0) (c1lmskbe1) h'0080 143c can1 local mask register b extended id2 (use inhibited area) 13-51 (c1lmskbe2) h'0080 143e (use inhibited area) | |
13 13-10 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can module related register map (7/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 1440 can1 single-shot mode control register 13-53 (can1ssmode) h'0080 1442 (use inhibited area) h'0080 1444 can1 single-shot interrupt request status register 13-33 (can1ssist) h'0080 1446 (use inhibited area) h'0080 1448 can1 single-shot interrupt request mask register 13-34 (can1ssimk) (use inhibited area) h'0080 1450 can1 message slot 0 control register can1 message slot 1 control register 13-54 (c1msl0cnt) (c1msl1cnt) h'0080 1452 can1 message slot 2 control register can1 message slot 3 control register 13-54 (c1msl2cnt) (c1msl3cnt) h'0080 1454 can1 message slot 4 control register can1 message slot 5 control register 13-54 (c1msl4cnt) (c1msl5cnt) h'0080 1456 can1 message slot 6 control register can1 message slot 7 control register 13-54 (c1msl6cnt) (c1msl7cnt) h'0080 1458 can1 message slot 8 control register can1 message slot 9 control register 13-54 (c1msl8cnt) (c1msl9cnt) h'0080 145a can1 message slot 10 control register can1 message slot 11 control register 13-54 (c1msl10cnt) (c1msl11cnt) h'0080 145c can1 message slot 12 control register can1 message slot 13 control register 13-54 (c1msl12cnt) (c1msl13cnt) h'0080 145e can1 message slot 14 control register can1 message slot 15 control register 13-54 (c1msl14cnt) (c1msl15cnt) (use inhibited area) h'0080 1500 can1 message slot 0 standard id0 can1 message slot 0 standard id1 13-58 (c1msl0sid0) (c1msl0sid1) 13-59 h'0080 1502 can1 message slot 0 extended id0 can1 message slot 0 extended id1 13-60 (c1msl0eid0) (c1msl0eid1) 13-61 h'0080 1504 can1 message slot 0 extended id2 can1 message slot 0 data length register 13-62 (c1msl0eid2) (c1msl0dlc) 13-63 h'0080 1506 can1 message slot 0 data 0 can1 message slot 0 data 1 13-64 (c1msl0dt0) (c1msl0dt1) 13-65 h'0080 1508 can1 message slot 0 data 2 can1 message slot 0 data 3 13-66 (c1msl0dt2) (c1msl0dt3) 13-67 h'0080 150a can1 message slot 0 data 4 can1 message slot 0 data 5 13-68 (c1msl0dt4) (c1msl0dt5) 13-69 h'0080 150c can1 message slot 0 data 6 can1 message slot 0 data 7 13-70 (c1msl0dt6) (c1msl0dt7) 13-71 h'0080 150e can1 message slot 0 timestamp 13-72 (c1msl0tsp) h'0080 1510 can1 message slot 1 standard id0 can1 message slot 1 standard id1 13-58 (c1msl1sid0) (c1msl1sid1) 13-59 h'0080 1512 can1 message slot 1 extended id0 can1 message slot 1 extended id1 13-60 (c1msl1eid0) (c1msl1eid1) 13-61 h'0080 1514 can1 message slot 1 extended id2 can1 message slot 1 data length register 13-62 (c1msl1eid2) (c1msl1dlc) 13-63 h'0080 1516 can1 message slot 1 data 0 can1 message slot 1 data 1 13-64 (c1msl1dt0) (c1msl1dt1) 13-65 h'0080 1518 can1 message slot 1 data 2 can1 message slot 1 data 3 13-66 (c1msl1dt2) (c1msl1dt3) 13-67 h'0080 151a can1 message slot 1 data 4 can1 message slot 1 data 5 13-68 (c1msl1dt4) (c1msl1dt5) 13-69 h'0080 151c can1 message slot 1 data 6 can1 message slot 1 data 7 13-70 (c1msl1dt6) (c1msl1dt7) 13-71 h'0080 151e can1 message slot 1 timestamp 13-72 (c1msl1tsp) | |
13-11 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can module related register map (8/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 1520 can1 message slot 2 standard id0 can1 message slot 2 standard id1 13-58 (c1msl2sid0) (c1msl2sid1) 13-59 h'0080 1522 can1 message slot 2 extended id0 can1 message slot 2 extended id1 13-60 (c1msl2eid0) (c1msl2eid1) 13-61 h'0080 1524 can1 message slot 2 extended id2 can1 message slot 2 data length register 13-62 (c1msl2eid2) (c1msl2dlc) 13-63 h'0080 1526 can1 message slot 2 data 0 can1 message slot 2 data 1 13-64 (c1msl2dt0) (c1msl2dt1) 13-65 h'0080 1528 can1 message slot 2 data 2 can1 message slot 2 data 3 13-66 (c1msl2dt2) (c1msl2dt3) 13-67 h'0080 152a can1 message slot 2 data 4 can1 message slot 2 data 5 13-68 (c1msl2dt4) (c1msl2dt5) 13-69 h'0080 152c can1 message slot 2 data 6 can1 message slot 2 data 7 13-70 (c1msl2dt6) (c1msl2dt7) 13-71 h'0080 152e can1 message slot 2 timestamp 13-72 (c1msl2tsp) h'0080 1530 can1 message slot 3 standard id0 can1 message slot 3 standard id1 13-58 (c1msl3sid0) (c1msl3sid1) 13-59 h'0080 1532 can1 message slot 3 extended id0 can1 message slot 3 extended id1 13-60 (c1msl3eid0) (c1msl3eid1) 13-61 h'0080 1534 can1 message slot 3 extended id2 can1 message slot 3 data length register 13-62 (c1msl3eid2) (c1msl3dlc) 13-63 h'0080 1536 can1 message slot 3 data 0 can1 message slot 3 data 1 13-64 (c1msl3dt0) (c1msl3dt1) 13-65 h'0080 1538 can1 message slot 3 data 2 can1 message slot 3 data 3 13-66 (c1msl3dt2) (c1msl3dt3) 13-67 h'0080 153a can1 message slot 3 data 4 can1 message slot 3 data 5 13-68 (c1msl3dt4) (c1msl3dt5) 13-69 h'0080 153c can1 message slot 3 data 6 can1 message slot 3 data 7 13-70 (c1msl3dt6) (c1msl3dt7) 13-71 h'0080 153e can1 message slot 3 timestamp 13-72 (c1msl3tsp) h'0080 1540 can1 message slot 4 standard id0 can1 message slot 4 standard id1 13-58 (c1msl4sid0) (c1msl4sid1) 13-59 h'0080 1542 can1 message slot 4 extended id0 can1 message slot 4 extended id1 13-60 (c1msl4eid0) (c1msl4eid1) 13-61 h'0080 1544 can1 message slot 4 extended id2 can1 message slot 4 data length register 13-62 (c1msl4eid2) (c1msl4dlc) 13-63 h'0080 1546 can1 message slot 4 data 0 can1 message slot 4 data 1 13-64 (c1msl4dt0) (c1msl4dt1) 13-65 h'0080 1548 can1 message slot 4 data 2 can1 message slot 4 data 3 13-66 (c1msl4dt2) (c1msl4dt3) 13-67 h'0080 154a can1 message slot 4 data 4 can1 message slot 4 data 5 13-68 (c1msl4dt4) (c1msl4dt5) 13-69 h'0080 154c can1 message slot 4 data 6 can1 message slot 4 data 7 13-70 (c1msl4dt6) (c1msl4dt7) 13-71 h'0080 154e can1 message slot 4 timestamp 13-72 (c1msl4tsp) h'0080 1550 can1 message slot 5 standard id0 can1 message slot 5 standard id1 13-58 (c1msl5sid0) (c1msl5sid1) 13-59 h'0080 1552 can1 message slot 5 extended id0 can1 message slot 5 extended id1 13-60 (c1msl5eid0) (c1msl5eid1) 13-61 h'0080 1554 can1 message slot 5 extended id2 can1 message slot 5 data length register 13-62 (c1msl5eid2) (c1msl5dlc) 13-63 h'0080 1556 can1 message slot 5 data 0 can1 message slot 5 data 1 13-64 (c1msl5dt0) (c1msl5dt1) 13-65 h'0080 1558 can1 message slot 5 data 2 can1 message slot 5 data 3 13-66 (c1msl5dt2) (c1msl5dt3) 13-67 h'0080 155a can1 message slot 5 data 4 can1 message slot 5 data 5 13-68 (c1msl5dt4) (c1msl5dt5) 13-69 h'0080 155c can1 message slot 5 data 6 can1 message slot 5 data 7 13-70 (c1msl5dt6) (c1msl5dt7) 13-71 h'0080 155e can1 message slot 5 timestamp 13-72 (c1msl5tsp)
13 13-12 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can module related register map (9/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 1560 can1 message slot 6 standard id0 can1 message slot 6 standard id1 13-58 (c1msl6sid0) (c1msl6sid1) 13-59 h'0080 1562 can1 message slot 6 extended id0 can1 message slot 6 extended id1 13-60 (c1msl6eid0) (c1msl6eid1) 13-61 h'0080 1564 can1 message slot 6 extended id2 can1 message slot 6 data length register 13-62 (c1msl6eid2) (c1msl6dlc) 13-63 h'0080 1566 can1 message slot 6 data 0 can1 message slot 6 data 1 13-64 (c1msl6dt0) (c1msl6dt1) 13-65 h'0080 1568 can1 message slot 6 data 2 can1 message slot 6 data 3 13-66 (c1msl6dt2) (c1msl6dt3) 13-67 h'0080 156a can1 message slot 6 data 4 can1 message slot 6 data 5 13-68 (c1msl6dt4) (c1msl6dt5) 13-69 h'0080 156c can1 message slot 6 data 6 can1 message slot 6 data 7 13-70 (c1msl6dt6) (c1msl6dt7) 13-71 h'0080 156e can1 message slot 6 timestamp 13-72 (c1msl6tsp) h'0080 1570 can1 message slot 7 standard id0 can1 message slot 7 standard id1 13-58 (c1msl7sid0) (c1msl7sid1) 13-59 h'0080 1572 can1 message slot 7 extended id0 can1 message slot 7 extended id1 13-60 (c1msl7eid0) (c1msl7eid1) 13-61 h'0080 1574 can1 message slot 7 extended id2 can1 message slot 7 data length register 13-62 (c1msl7eid2) (c1msl7dlc) 13-63 h'0080 1576 can1 message slot 7 data 0 can1 message slot 7 data 1 13-64 (c1msl7dt0) (c1msl7dt1) 13-65 h'0080 1578 can1 message slot 7 data 2 can1 message slot 7 data 3 13-66 (c1msl7dt2) (c1msl7dt3) 13-67 h'0080 157a can1 message slot 7 data 4 can1 message slot 7 data 5 13-68 (c1msl7dt4) (c1msl7dt5) 13-69 h'0080 157c can1 message slot 7 data 6 can1 message slot 7 data 7 13-70 (c1msl7dt6) (c1msl7dt7) 13-71 h'0080 157e can1 message slot 7 timestamp 13-72 (c1msl7tsp) h'0080 1580 can1 message slot 8 standard id0 can1 message slot 8 standard id1 13-58 (c1msl8sid0) (c1msl8sid1) 13-59 h'0080 1582 can1 message slot 8 extended id0 can1 message slot 8 extended id1 13-60 (c1msl8eid0) (c1msl8eid1) 13-61 h'0080 1584 can1 message slot 8 extended id2 can1 message slot 8 data length register 13-62 (c1msl8eid2) (c1msl8dlc) 13-63 h'0080 1586 can1 message slot 8 data 0 can1 message slot 8 data 1 13-64 (c1msl8dt0) (c1msl8dt1) 13-65 h'0080 1588 can1 message slot 8 data 2 can1 message slot 8 data 3 13-66 (c1msl8dt2) (c1msl8dt3) 13-67 h'0080 158a can1 message slot 8 data 4 can1 message slot 8 data 5 13-68 (c1msl8dt4) (c1msl8dt5) 13-69 h'0080 158c can1 message slot 8 data 6 can1 message slot 8 data 7 13-70 (c1msl8dt6) (c1msl8dt7) 13-71 h'0080 158e can1 message slot 8 timestamp 13-72 (c1msl8tsp) h'0080 1590 can1 message slot 9 standard id0 can1 message slot 9 standard id1 13-58 (c1msl9sid0) (c1msl9sid1) 13-59 h'0080 1592 can1 message slot 9 extended id0 can1 message slot 9 extended id1 13-60 (c1msl9eid0) (c1msl9eid1) 13-61 h'0080 1594 can1 message slot 9 extended id2 can1 message slot 9 data length register 13-62 (c1msl9eid2) (c1msl9dlc) 13-63 h'0080 1596 can1 message slot 9 data 0 can1 message slot 9 data 1 13-64 (c1msl9dt0) (c1msl9dt1) 13-65 h'0080 1598 can1 message slot 9 data 2 can1 message slot 9 data 3 13-66 (c1msl9dt2) (c1msl9dt3) 13-67 h'0080 159a can1 message slot 9 data 4 can1 message slot 9 data 5 13-68 (c1msl9dt4) (c1msl9dt5) 13-69 h'0080 159c can1 message slot 9 data 6 can1 message slot 9 data 7 13-70 (c1msl9dt6) (c1msl9dt7) 13-71 h'0080 159e can1 message slot 9 timestamp 13-72 (c1msl9tsp)
13-13 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can module related register map (10/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 15a0 can1 message slot 10 standard id0 can1 message slot 10 standard id1 13-58 (c1msl10sid0) (c1msl10sid1) 13-59 h'0080 15a2 can1 message slot 10 extended id0 can1 message slot 10 extended id1 13-60 (c1msl10eid0) (c1msl10eid1) 13-61 h'0080 15a4 can1 message slot 10 extended id2 can1 message slot 10 data length register 13-62 (c1msl10eid2) (c1msl10dlc) 13-63 h'0080 15a6 can1 message slot 10 data 0 can1 message slot 10 data 1 13-64 (c1msl10dt0) (c1msl10dt1) 13-65 h'0080 15a8 can1 message slot 10 data 2 can1 message slot 10 data 3 13-66 (c1msl10dt2) (c1msl10dt3) 13-67 h'0080 15aa can1 message slot 10 data 4 can1 message slot 10 data 5 13-68 (c1msl10dt4) (c1msl10dt5) 13-69 h'0080 15ac can1 message slot 10 data 6 can1 message slot 10 data 7 13-70 (c1msl10dt6) (c1msl10dt7) 13-71 h'0080 15ae can1 message slot 10 timestamp 13-72 (c1msl10tsp) h'0080 15b0 can1 message slot 11 standard id0 can1 message slot 11 standard id1 13-58 (c1msl11sid0) (c1msl11sid1) 13-59 h'0080 15b2 can1 message slot 11 extended id0 can1 message slot 11 extended id1 13-60 (c1msl11eid0) (c1msl11eid1) 13-61 h'0080 15b4 can1 message slot 11 extended id2 can1 message slot 11 data length register 13-62 (c1msl11eid2) (c1msl11dlc) 13-63 h'0080 15b6 can1 message slot 11 data 0 can1 message slot 11 data 1 13-64 (c1msl11dt0) (c1msl11dt1) 13-65 h'0080 15b8 can1 message slot 11 data 2 can1 message slot 11 data 3 13-66 (c1msl11dt2) (c1msl11dt3) 13-67 h'0080 15ba can1 message slot 11 data 4 can1 message slot 11 data 5 13-68 (c1msl11dt4) (c1msl11dt5) 13-69 h'0080 15bc can1 message slot 11 data 6 can1 message slot 11 data 7 13-70 (c1msl11dt6) (c1msl11dt7) 13-71 h'0080 15be can1 message slot 11 timestamp 13-72 (c1msl11tsp) h'0080 15c0 can1 message slot 12 standard id0 can1 message slot 12 standard id1 13-58 (c1msl12sid0) (c1msl12sid1) 13-59 h'0080 15c2 can1 message slot 12 extended id0 can1 message slot 12 extended id1 13-60 (c1msl12eid0) (c1msl12eid1) 13-61 h'0080 15c4 can1 message slot 12 extended id2 can1 message slot 12 data length register 13-62 (c1msl12eid2) (c1msl12dlc) 13-63 h'0080 15c6 can1 message slot 12 data 0 can1 message slot 12 data 1 13-64 (c1msl12dt0) (c1msl12dt1) 13-65 h'0080 15c8 can1 message slot 12 data 2 can1 message slot 12 data 3 13-66 (c1msl12dt2) (c1msl12dt3) 13-67 h'0080 15ca can1 message slot 12 data 4 can1 message slot 12 data 5 13-68 (c1msl12dt4) (c1msl12dt5) 13-69 h'0080 15cc can1 message slot 12 data 6 can1 message slot 12 data 7 13-70 (c1msl12dt6) (c1msl12dt7) 13-71 h'0080 15ce can1 message slot 12 timestamp 13-72 (c1msl12tsp) h'0080 15d0 can1 message slot 13 standard id0 can1 message slot 13 standard id1 13-58 (c1msl13sid0) (c1msl13sid1) 13-59 h'0080 15d2 can1 message slot 13 extended id0 can1 message slot 13 extended id1 13-60 (c1msl13eid0) (c1msl13eid1) 13-61 h'0080 15d4 can1 message slot 13 extended id2 can1 message slot 13 data length register 13-62 (c1msl13eid2) (c1msl13dlc) 13-63 h'0080 15d6 can1 message slot 13 data 0 can1 message slot 13 data 1 13-64 (c1msl13dt0) (c1msl13dt1) 13-65 h'0080 15d8 can1 message slot 13 data 2 can1 message slot 13 data 3 13-66 (c1msl13dt2) (c1msl13dt3) 13-67 h'0080 15da can1 message slot 13 data 4 can1 message slot 13 data 5 13-68 (c1msl13dt4) (c1msl13dt5) 13-69 h'0080 15dc can1 message slot 13 data 6 can1 message slot 13 data 7 13-70 (c1msl13dt6) (c1msl13dt7) 13-71 h'0080 15de can1 message slot 13 timestamp 13-72 (c1msl13tsp)
13 13-14 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can module related register map (11/11) address +0 address +1 address see pages b0 b7 b8 b15 h'0080 15e0 can1 message slot 14 standard id0 can1 message slot 14 standard id1 13-58 (c1msl14sid0) (c1msl14sid1) 13-59 h'0080 15e2 can1 message slot 14 extended id0 can1 message slot 14 extended id1 13-60 (c1msl14eid0) (c1msl14eid1) 13-61 h'0080 15e4 can1 message slot 14 extended id2 can1 message slot 14 data length register 13-62 (c1msl14eid2) (c1msl14dlc) 13-63 h'0080 15e6 can1 message slot 14 data 0 can1 message slot 14 data 1 13-64 (c1msl14dt0) (c1msl14dt1) 13-65 h'0080 15e8 can1 message slot 14 data 2 can1 message slot 14 data 3 13-66 (c1msl14dt2) (c1msl14dt3) 13-67 h'0080 15ea can1 message slot 14 data 4 can1 message slot 14 data 5 13-68 (c1msl14dt4) (c1msl14dt5) 13-69 h'0080 15ec can1 message slot 14 data 6 can1 message slot 14 data 7 13-70 (c1msl14dt6) (c1msl14dt7) 13-71 h'0080 15ee can1 message slot 14 timestamp 13-72 (c1msl14tsp) h'0080 15f0 can1 message slot 15 standard id0 can1 message slot 15 standard id1 13-58 (c1msl15sid0) (c1msl15sid1) 13-59 h'0080 15f2 can1 message slot 15 extended id0 can1 message slot 15 extended id1 13-60 (c1msl15eid0) (c1msl15eid1) 13-61 h'0080 15f4 can1 message slot 15 extended id2 can1 message slot 15 data length register 13-62 (c1msl15eid2) (c1msl15dlc) 13-63 h'0080 15f6 can1 message slot 15 data 0 can1 message slot 15 data 1 13-64 (c1msl15dt0) (c1msl15dt1) 13-65 h'0080 15f8 can1 message slot 15 data 2 can1 message slot 15 data 3 13-66 (c1msl15dt2) (c1msl15dt3) 13-67 h'0080 15fa can1 message slot 15 data 4 can1 message slot 15 data 5 13-68 (c1msl15dt4) (c1msl15dt5) 13-69 h'0080 15fc can1 message slot 15 data 6 can1 message slot 15 data 7 13-70 (c1msl15dt6) (c1msl15dt7) 13-71 h'0080 15fe can1 message slot 15 timestamp 13-72 (c1msl15tsp) (use inhibited area) h'0080 3ffe (use inhibited area) |
13-15 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module 13.2.1 can control registers can0 control register (can0cnt) can1 control register (can1cnt) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 fr st t sp tsr rb o bcm lbm rst 0 0 0 0 0 00 0 0 0 0 1 0 0 01 b bit name function r w 0?3 no function assigned. fix to "0". 00 4 rbo 0: enable normal operation r(note 1) return bus off bit 1: request clearing of error counter 5 tsr 0: enable count operation r(note 1) timestamp counter reset bit 1: initialize count (to h?0000) 6?7 tsp 00: select can bus bit clock r w timestamp prescaler bit 01: select can bus bit clock divided by 2 10: select can bus bit clock divided by 3 11: select can bus bit clock divided by 4 8-10 no function assigned. fix to "0". 00 11 frst 0: negate reset r w forcible reset bit 1: forcibly reset 12 bcm 0: disable basiccan mode r w basiccan mode bit 1: basiccan mode 13 no function assigned. fix to "0". 00 14 lbm 0: disable loopback function r w loopback mode bit 1: enable loopback function 15 rst 0: negate reset r w can reset bit 1: request reset note 1: only writing "1" is effective. automatically cleared to "0" in hardware.
13 13-16 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers (1) rbo (return bus off) bit (bit 4) setting this bit to "1" clears the can receive error count register (cannrec) and can transmit error count register (canntec) to h'00 and forcibly places the can module into an error active state. this bit is cleared when the can module goes to an error active state. note: ? communication becomes possible when 11 consecutive recessive bits are detected on the can bus after clearing the error counters. (2) tsr (timestamp counter reset) bit (bit 5) setting this bit to "1" clears the value of the can timestamp count register (canntstmp) to h?0000. this bit is cleared after the value of the can timestamp count register (canntstmp) is cleared to h?0000. (3) tsp (timestamp prescaler) bits (bits 6?7) these bits select the count clock source for the timestamp counter. note: ? do not change settings of the tsp bits while can is operating (can status register crs bit = "0"). (4) frst (forcible reset) bit (bit 11) when the frst bit is set to "1", the can module is separated from the can bus and the protocol control unit is reset regardless of whether the can module currently is communicating. up to 5 bclk periods are re- quired before the protocol control unit is reset after setting the frst bit. notes: ? in order for can communication to start, the frst and rst bits must be cleared to "0". ? if the frst bit is set to "1" during communication, the ctx pin output goes high immediately after that. therefore, setting the frst bit to "1" while sending can frame may cause a can bus error. ? the can message slot control register?s transmit/receive requests are not cleared for rea- sons that the frst or rst bits are set. ? when the protocol control unit is reset by setting the frst bit to "1", the can timestamp count and can transmit/receive error count registers are initialized to "0". (5) bcm (basiccan mode) bit (bit 12) by setting this bit to "1", the can module can be operated in basiccan mode. ? operation during basiccan mode during basiccan mode, two local slots?slots 14 and 15?are used as dual buffers, and the received frames with matching id are stored alternately in slots 14 and 15 by acceptance filtering. used for this acceptance filtering when slot 14 is active (next received frame to be stored in slot 14) are the id set in slot 14 and local mask a, and those when slot 15 is active are the id set in slot 15 and local mask b. two types of frames?data frame and remote frame?can be received in this mode. by setting the same id and the same mask register value for the two slots, the possibility of loosing messages when, for example, receiving frames which have many ids may be reduced.
13-17 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module ? procedure for entering basiccan mode follow the procedure below during initialization: 1) set the id for slots 14 and 15 and the local mask registers a and b. (we recommend setting the same value.) 2) set the frame types to be handled by slots 14 and 15 (standard or extended) in the can extended id register. (we recommend setting the same type.) 3) set the message slot control registers for slots 14 and 15 for data frame reception. 4) set the bcm bit to "1". notes: ? do not change settings of the bcm bit while can is operating (can status register crs bit = "0"). ? the first slot that is active after clearing the rst bit is slot 14. ? even during basiccan mode, slots 0 to 13 can be used the same way as in normal operation. (6) lbm (loopback mode) bit (bit 14) when the lbm bit is set to "1", if a receive slot exists whose id matches that of the frame sent by the can module itself, then the frame can be received. notes: ? ack is not returned for the transmit frame. ? do not change settings of the lbm bit while can is operating (can status register crs bit = "0"). (7) rst (can reset) bit (bit 15) when the rst bit is cleared to "0", the can module is connected to the can bus and becomes ready to communicate after detecting 11 consecutive recessive bits. also, the can timestamp count register thereby starts counting. when the rst bit is set to "1", the bus will enter an idle state after sending frames from the slots which have transmit requests set by that time, then the protocol control unit is reset and the can module is disconnected from the can bus. frames received during this time are processed normally. notes: ? it is inhibited to set a new transmit request until the can status register crs bit is set to "1" and the protocol control unit is reset after setting the rst bit to "1". ? when the protocol control unit is reset by setting the rst bit to "1", the can timestamp count and can transmit/receive error count registers are initialized to "0". ? in order for can communication to start, the frst and rst bits must be cleared to "0".
13 13-18 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers 13.2.2 can status registers can0 status register (can0stat) can1 status register (can1stat) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 tsc rsc tsb rsb crs lbs bcs cbs eps bos msn 0 0000 0 0100000000 b bit name function r w 0 no function assigned. fix to "0". 00 1 bos 0: not bus off r ? bus off status bit 1: bus off state 2 eps 0: not error passive r ? error passive status bit 1: error passive state 3 cbs 0: no error occurred r ? can bus error bit 1: error occurred 4 bcs 0: normal mode r ? basiccan status bit 1: basiccan mode 5 no function assigned. fix to "0". 00 6 lbs 0: normal mode r ? loopback status bit 1: loopback mode 7 crs 0: operating r ? can reset status bit 1: reset 8 rsb 0: not receiving r ? receive status bit 1: receiving 9 tsb 0: not sending r ? transmit status bit 1: sending 10 rsc 0: reception not completed r ? reception completed status bit 1: reception completed 11 tsc 0: transmission not completed r ? transmission completed status bit 1: transmission completed 12?15 msn number of the message slot which has finished r ? message slot number bit sending or receiving 0000: slot 0 0001: slot 1 0010: slot 2 0011: slot 3 0100: slot 4 0101: slot 5 0110: slot 6 0111: slot 7 1000: slot 8 1001: slot 9 1010: slot 10 1011: slot 11 1100: slot 12 1101: slot 13 1110: slot 14 1111: slot 15
13-19 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module (1) bos (bus off status) bit (bit 1) when bos bit = "1", it means that the can module is in a bus off state. [set condition] this bit is set to "1" when the transmit error count register value exceeded 255 and a bus off state is entered. [clear condition] this bit is cleared when restored from the bus off state. (2) eps (error passive status) bit (bit 2) when eps bit = "1", it means that the can module is in an error passive state. [set condition] this bit is set to "1" when the transmit or receive error count register value exceeded 127 and an error passive state is entered. [clear condition] this bit is cleared when restored from the error passive state. (3) cbs (can bus error) bit (bit 3) [set condition] this bit is set to "1" when an error is detected on the can bus. [clear condition] this bit is cleared when the can module finished sending or receiving normally. (4) bcs (basiccan status) bit (bit 4) when bcs bit = "1", it means that the can module is operating in basiccan mode. [set condition] this bit is set to "1" when the can module is operating in basiccan mode. basiccan mode is useful when the following conditions are met: ? can control register bcm bit = "1" ? slots 14 and 15 both are set for data frame reception [clear condition] this bit is cleared by clearing the bcm bit to "0". (5) lbs (loopback status) bit (bit 6) when lbs bit = "1", it means that the can module is operating in loopback mode. [set condition] this bit is set to "1" by setting the can control register lbm (loopback mode) bit to "1". [clear condition] this bit is cleared by clearing the lbm bit to "0".
13 13-20 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers (6) crs (can reset status) bit (bit 7) when crs bit = "1", it means that the protocol control unit is in a reset state. [set condition] this bit is set to "1" when the can protocol control unit is in a reset state. [clear condition] this bit is cleared by clearing the can control register rst (can reset) and frst bits to "0". (7) rsb (receive status) bit (bit 8) [set condition] this bit is set to "1" when the can module is operating as a receive node. [clear condition] this bit is cleared when the can module starts operating as a transmit node or enters a bus idle state. (8) tsb (transmit status) bit (bit 9) [set condition] this bit is set to "1" when the can module is operating as a transmit node. [clear condition] this bit is cleared when the can module starts operating as a receive node or enters a bus idle state. (9) rsc (reception completed status) bit (bit 10) [set condition] this bit is set to "1" when the can module has finished receiving normally (regardless of whether there is any slot that meets receive conditions). [clear condition] this bit is cleared when the can module has finished sending normally. (10) tsc (transmission completed status) bit (bit 11) [set condition] this bit is set to "1" when the can module has finished sending normally. [clear condition] this bit is cleared when the can module has finished receiving normally. (11) msn (message slot number) bits (bits 12?15) these bits indicate the relevant slot number when the can module has finished sending or finished storing the received data. these bits cannot be cleared to "0" in software. note: ? when can module receives the frame that is transmitted by the can module itself during loopback mode, the msn bits indicate the transmit slot number.
13-21 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module 13.2.3 can extended id registers can0 extended id register (can0extid) can1 extended id register (can1extid) b01234567891011121314b15 ide0 ide1 ide2 ide3 ide4 ide6 ide7 ide8 ide9 ide10 ide11 ide12 ide13 ide14 ide15 ide5 0000000000000000 b bit name function r w 0 ide0 (slot 0 extended format bit) 0: standard id format r w 1 ide1 (slot 1 extended format bit) 1: extended id format 2 ide2 (slot 2 extended format bit) 3 ide3 (slot 3 extended format bit) 4 ide4 (slot 4 extended format bit) 5 ide5 (slot 5 extended format bit) 6 ide6 (slot 6 extended format bit) 7 ide7 (slot 7 extended format bit) 8 ide8 (slot 8 extended format bit) 9 ide9 (slot 9 extended format bit) 10 ide10 (slot 10 extended format bit) 11 ide11 (slot 11 extended format bit) 12 ide12 (slot 12 extended format bit) 13 ide13 (slot 13 extended format bit) 14 ide14 (slot 14 extended format bit) 15 ide15 (slot 15 extended format bit) this register selects the format of frames handled by message slots corresponding to the respective bits in the register. setting any bit in this register to "0" selects the standard id format, and setting any bit in this register to "1" selects the extended id format. note: ? settings of any bit in this register can only be changed when the corresponding slot does not have transmit or receive requests set.
13 13-22 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers 13.2.4 can configuration registers can0 configuration register (can0conf) can1 configuration register (can1conf) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 sam prb ph1 ph2 sjw 000000000000 0 0 0 0 b bit name function r w 0?1 sjw 00: sjw = 1tq r w resynchronization jump width setting bit 01: sjw = 2tq 10: sjw = 3tq 11: sjw = 4tq 2?4 ph2 000: phase segment2 = 1tq r w phase segment2 setting bit 001: phase segment2 = 2tq 010: phase segment2 = 3tq 011: phase segment2 = 4tq 100: phase segment2 = 5tq 101: phase segment2 = 6tq 110: phase segment2 = 7tq 111: phase segment2 = 8tq 5?7 ph1 000: phase segment1 = 1tq r w phase segment1 setting bit 001: phase segment1 = 2tq 010: phase segment1 = 3tq 011: phase segment1 = 4tq 100: phase segment1 = 5tq 101: phase segment1 = 6tq 110: phase segment1 = 7tq 111: phase segment1 = 8tq 8?10 prb 000: propagation segment = 1tq r w propagation segment setting bit 001: propagation segment = 2tq 010: propagation segment = 3tq 011: propagation segment = 4tq 100: propagation segment = 5tq 101: propagation segment = 6tq 110: propagation segment = 7tq 111: propagation segment = 8tq 11 sam 0: sampled one time r w sampling count select bit 1: sampled three times 12?15 no function assigned. fix to "0". 00 notes: ? do not change settings of the can configuration register (can0conf or can1conf) during can operation (can status register crs bit = "0"). ? when setting the bits in this register, make sure the conditions given below are met: ? number of tq?s for one bit: 8?25 tq?s ? sjw
13-23 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module (1) sjw bits (bits 0?1) these bits set the resynchronization jump width. (2) ph2 bits (bits 2?4) these bits set the width of phase segment2. (3) ph1 bits (bits 5?7) these bits set the width of phase segment1. (4) prb bits (bits 8?10) these bits set the width of propagation segment. (5) sam bit (bit 11) this bit sets the number of times each bit is sampled. when sam = "0", the value sampled at the end of phase segment1 is assumed to be the value of the bit. when sam = "1", the value of the bit is determined by a majority circuit from three sampled values, each sampled 2 tq?s before, 1 tq before, and at the end of phase segment1. table 13.2.1 typical settings of bit timing when cpu clock = 40 mhz baud rate brp set value tq period (ns) no. of tq?s in 1 bit prop + ph1 ph2 sampling point 1m bps 1 50 20 13 6 70% 3 100 10 7 2 80% 3 100 10 6 3 70% 3 100 10 5 4 60% 4 125 8 5 2 75% 4 125 8 4 3 63% 500k bps 4 125 16 13 2 88% 4 125 16 12 3 81% 4 125 16 11 4 75% 7 200 10 7 2 80% 7 200 10 6 3 70% 7 200 10 5 4 60% 9 250 8 5 2 75% 9 250 8 4 3 63% table 13.2.2 typical settings of bit timing when cpu clock = 32 mhz baud rate brp set value tq period (ns) no. of tq?s in 1 bit prop + ph1 ph2 sampling point 1m bps 1 62.5 16 10 5 69% 3 125 8 5 2 75% 3 125 8 4 3 63% 500k bps 3 125 16 13 2 88% 3 125 16 11 4 75% 7 250 8 5 2 75% 7 250 8 4 3 63%
13 13-24 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers 13.2.5 can timestamp count registers can0 timestamp count register (can0tstmp) can1 timestamp count register (can1tstmp) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 cantstmp 0000000000000000 b bit name function r w 0?15 cantstmp 16-bit timestamp count value r ? the can module contains a 16-bit up-count register. the count period can be selected from the can bus bit period divided by 1, 2, 3 or 4 by setting the can control register (canncnt) tsp (timestamp prescaler) bits. when the can module finishes sending or receiving, it captures the count register value and stores the value in a message slot. the counter is made to start counting by clearing the can control register (canncnt) rst bit to "0". notes: ? the can protocol control unit can be reset and the counter initialized to h?0000 by setting the can control register (canncnt) rst (can reset) bit to "1". or the counter can be initialized to h?0000 while the can module remains operating by setting the tsr (timestamp counter reset) bit to "1". ? if any slot with the matching id exists during loopback mode, the can module stores the timestamp value in that slot when it finished receiving. (no timestamp values are stored this way when the can module finished sending.) ? the count period of the can timestamp count register varies with the can resynchronization function.
13-25 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module 13.2.6 can error count registers can0 receive error count register (can0rec) can1 receive error count register (can1rec) 123456b7 b0 rec 00000000 b bit name function r w 0?7 rec receive error count value r ? during an error active/error passive state, a receive error count value is stored in this register. the count is decremented when frames are received normally or incremented when an error occurred. if the can module finished receiving normally when rec 9 10 11 12 13 14 b15 b8 tec 00000000 b bit name function r w 8?15 tec transmit error count value r ? during an error active/error passive state, a transmit error count value is stored in this register. the count is decremented when frames are transmitted normally or incremented when an error occurred. dur- ing a bus off state, an undefined value is stored in this register. the count is reset to h?00 upon returning to an error active state.
13 13-26 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers 13.2.7 can baud rate prescalers can0 baud rate prescaler (can0brp) can1 baud rate prescaler (can1brp) 123456b7 b0 brp 00000001 b bit name function r w 0?7 brp baud rate prescaler value r w this register sets the tq period of can. the can baud rate is determined by (tq period = 1 tq period = synchronization segment + propagation segment + phase segment 1 + phase segment 2 notes: ? setting h?00 (divide by 1) is inhibited. ? do not change settings of the can baud rate prescaler (cannbrp) during can operation (can status register crs bit = "0").
13-27 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module 13.2.8 can interrupt related registers the can interrupt related registers are used to control the interrupt request signals output to the interrupt control- ler by can. (1) interrupt request status bit this status bit is used to determine whether an interrupt is requested. when an interrupt request occurs, this bit is set in hardware (cannot be set in software). the status bit is cleared by writing "0". writing "1" has no effect; the bit retains the status it had before the write. because this bit is unaffected by the interrupt request enable bit, it can also be used to inspect the operating status of peripheral functions. in interrupt handling, make sure that within the grouped interrupt request status, only the status bit for the interrupt request that has been serviced is cleared. if the status bit for any interrupt request that has not been serviced is cleared, the pending interrupt request is cleared simultaneously with its status bit. (2) interrupt request mask bit this bit is used to disable unnecessary interrupt requests within the grouped interrupt request. set this bit to "1" to enable interrupt requests or "0" to disable interrupt requests. figure 13.2.1 interrupt request status and mask registers to the interrupt controller interrupt request from each peripheral function interrupt request status data bus set  group interrupt interrupt request enable clear f/f f/f data = 0
13 13-28 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers figure 13.2.2 example for clearing interrupt request status b4 5 b7 interrupt request status initial state event occurs on bit 6 interrupt request event occurs on bit 4 only bit 6 cleared bit 4 data retained b4 5 b7 1 1 0 1 write to the interrupt request status example for clearing interrupt request status 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 program example istreg = 0xfd; /* clear istat1 (0x02 bit) only */  to clear the interrupt request status register 0 (istreg) interrupt request status 1, istat1 (0x02 bit) to clear an interrupt request status, always be sure to write 1 to all other interrupt request status bits. at this time, avoid using a logic operation like the one shown below. because it requires three step-istreg read, logic operation and write, if another interrupt request occurs between the read and write, status may be inadvertently cleared. b4 5 6 b7 interrupt request status event occurs on bit 6 event occurs on bit 4 only bit 6 cleared bit 4 also cleared 0 0 1 0 1 0 1 0 0 0 0 0 read 0 0 1 0 0 0 0 0 clear bit 6 (and'ing with 1101) write 6 6 istreg &= 0xfd; /* clear istat1 (0x02 bit) only */
13-29 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 slot interrupt request status register (can0slist) can1 slot interrupt request status register (can1slist) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 ssb0 ssb1 ssb2 ssb3 ssb4 ssb6 ssb7 ssb8 ssb9 ssb10 ssb11 ssb12 ssb13 ssb14 ssb15 ssb5 0000000000000000 b bit name function r w 0 ssb0 (slot 0 interrupt request status bit) 0: interrupt not requested r(note 1) 1 ssb1 (slot 1 interrupt request status bit) 1: interrupt requested 2 ssb2 (slot 2 interrupt request status bit) 3 ssb3 (slot 3 interrupt request status bit) 4 ssb4 (slot 4 interrupt request status bit) 5 ssb5 (slot 5 interrupt request status bit) 6 ssb6 (slot 6 interrupt request status bit) 7 ssb7 (slot 7 interrupt request status bit) 8 ssb8 (slot 8 interrupt request status bit) 9 ssb9 (slot 9 interrupt request status bit) 10 ssb10 (slot 10 interrupt request status bit) 11 ssb11 (slot 11 interrupt request status bit) 12 ssb12 (slot 12 interrupt request status bit) 13 ssb13 (slot 13 interrupt request status bit) 14 ssb14 (slot 14 interrupt request status bit) 15 ssb15 (slot 15 interrupt request status bit) note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the status it had before the write. when using can interrupts, this register helps to know which slot requested an interrupt. ? slots set for transmission the corresponding bit is set to "1" when the can module finished sending. this bit is cleared by writing "0" in software. ? slots set for reception the corresponding bit is set to "1" when the can module finished receiving and finished storing the received message in the message slot. this bit is cleared by writing "0" in software. when writing to the can slot interrupt request status, make sure only the bits to be cleared are set to "0" and all other bits are set to "1". those bits that have been set to "1" are unaffected by writing in software and retain the value they had before the write. notes: ? if the automatic response function is enabled for remote frame receive slots, the request status is set after the can module finished receiving a remote frame and after it finished sending a data frame. ? for remote frame transmit slots, the request status is set after the can module finished send- ing a remote frame and after it finished receiving a data frame. ? if the request status is set by an interrupt request at the same time it is cleared in software, the former has priority so that the request status is set.
13 13-30 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 slot interrupt request mask register (can0slimk) can1 slot interrupt request mask register (can1slimk) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 irb0 irb1 irb2 irb3 irb4 irb6 irb7 irb8 irb9 irb10 irb11 irb12 irb13 irb14 irb15 irb5 0000000000000000 b bit name function r w 0 irb0 (slot 0 interrupt request mask bit) 0: mask (disable) interrupt request r w 1 irb1 (slot 1 interrupt request mask bit) 1: enable interrupt request 2 irb2 (slot 2 interrupt request mask bit) 3 irb3 (slot 3 interrupt request mask bit) 4 irb4 (slot 4 interrupt request mask bit) 5 irb5 (slot 5 interrupt request mask bit) 6 irb6 (slot 6 interrupt request mask bit) 7 irb7 (slot 7 interrupt request mask bit) 8 irb8 (slot 8 interrupt request mask bit) 9 irb9 (slot 9 interrupt request mask bit) 10 irb10 (slot 10 interrupt request mask bit) 11 irb11 (slot 11 interrupt request mask bit) 12 irb12 (slot 12 interrupt request mask bit) 13 irb13 (slot 13 interrupt request mask bit) 14 irb14 (slot 14 interrupt request mask bit) 15 irb15 (slot 15 interrupt request mask bit) this register is used to enable or disable the interrupt requests that will be generated when data transmission or reception in each corresponding slot is completed. setting irbn (n = 0?15) to "1" enables the interrupt request to be generated when data transmission or reception in the corresponding slot is completed. the can slot interrupt request status register (cannslist) helps to know which slot requested the interrupt.
13-31 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 error interrupt request status register (can0erist) can1 error interrupt request status register (can1erist) 123456b7 b0 eis pis ois 000 0 0 0 0 0 b bit name function r w 0?4 no function assigned. fix to "0". 00 5 eis 0: interrupt not requested r(note 1) can bus error interrupt request status bit 1: interrupt requested 6 pis error passive interrupt request status bit 7 ois bus off interrupt request status bit note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the status it had before the write. when using can interrupts, if the interrupt request sources are associated with errors, this register helps to know which source generated the interrupt. (1) eis (can bus error interrupt request status) bit (bit 5) the eis bit is set to "1" when a communication error is detected. this bit is cleared by writing "0" in software. (2) pis (error passive interrupt request status) bit (bit 6) the pis bit is set to "1" when the can module goes to an error passive state. this bit is cleared by writing "0" in software. (3) ois (bus off interrupt request status) bit (bit 7) the ois bit is set to "1" when the can module goes to a bus off passive state. this bit is cleared by writing "0" in software. when writing to the can error interrupt request status, make sure only the bits to be cleared are set to "0" and all other bits are set to "1". those bits that have been set to "1" are unaffected by writing in software and retain the value they had before the write.
13 13-32 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 error interrupt request mask register (can0erimk) can1 error interrupt request mask register (can1erimk) 9 10 11 12 13 14 b15 b8 eim pim oim 000 0 0 0 0 0 b bit name function r w 8?12 no function assigned. fix to "0". 00 13 eim 0: mask (disable) interrupt request r w can bus error interrupt request mask bit 1: enable interrupt request 14 pim error passive interrupt request mask bit 15 oim bus off interrupt request mask bit (1) eim (can bus error interrupt request mask) bit (bit 13) the eim bit enables or disables the interrupt requests to be generated when can bus errors occurred. can bus error interrupt requests are enabled by setting this bit to "1". (2) pim (error passive interrupt request mask) bit (bit 14) the pim bit enables or disables the interrupt requests to be generated when the can module entered an error passive state. error passive interrupt requests are enabled by setting this bit to "1". (3) oim (bus off interrupt request mask) bit (bit 15) the oim bit enables or disables the interrupt requests to be generated when the can module entered a bus off state. bus off interrupt requests are enabled by setting this bit to "1".
13-33 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 single-shot interrupt request status register (can0ssist) can1 single-shot interrupt request status register (can1ssist) b01234567891011121314b15 ssist0 ssist1 ssist2 ssist3 ssist4 ssist5 ssist6 ssist7 ssist8 ssist9 ssist10 ssist11 ssist12 ssist13 ssist14 ssist15 0000000000000000 b bit name function r w 0 ssist0 0: no arbitration-lost or transmit error r(note 1) slot 0 single-shot interrupt request status bit 1: arbitration-lost or transmit error occurred 1 ssist1 slot 1 single-shot interrupt request status bit 2 ssist2 slot 2 single-shot interrupt request status bit 3 ssist3 slot 3 single-shot interrupt request status bit 4 ssist4 slot 4 single-shot interrupt request status bit 5 ssist5 slot 5 single-shot interrupt request status bit 6 ssist6 slot 6 single-shot interrupt request status bit 7 ssist7 slot 7 single-shot interrupt request status bit 8 ssist8 slot 8 single-shot interrupt request status bit 9 ssist9 slot 9 single-shot interrupt request status bit 10 ssist10 slot 10 single-shot interrupt request status bit 11 ssist11 slot 11 single-shot interrupt request status bit 12 ssist12 slot 12 single-shot interrupt request status bit 13 ssist13 slot 13 single-shot interrupt request status bit 14 ssist14 slot 14 single-shot interrupt request status bit 15 ssist15 slot 15 single-shot interrupt request status bit note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the status it had before the write. if transmission in any slot failed for reasons of a detection of arbitration-lost or a transmit error, the correspond- ing bit in this register is set to "1". the bit is cleared by writing "0" in software. furthermore, if the corresponding bit in the can single-shot interrupt request mask register has been set to "1", an interrupt request can be generated when transmission failed. when writing to the can single-shot interrupt request status, make sure only the bits to be cleared are set to "0" and all other bits are set to "1". those bits that have been set to "1" are unaffected by writing in software and retain the value they had before the write.
13 13-34 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 single-shot interrupt request mask register (can0ssimk) can1 single-shot interrupt request mask register (can1ssimk) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 ssimk0 ssimk1 ssimk2 ssimk3 ssimk4 ssimk5 ssimk6 ssimk7 ssimk8 ssimk9 ssimk10 ssimk11 ssimk12 ssimk13 ssimk14 ssimk15 0000000000000000 b bit name function r w 0 ssimk0 0: disable interrupt request r w slot 0 single-shot interrupt request mask bit 1: enable interrupt request 1 ssimk1 slot 1 single-shot interrupt request mask bit 2 ssimk2 slot 2 single-shot interrupt request mask bit 3 ssimk3 slot 3 single-shot interrupt request mask bit 4 ssimk4 slot 4 single-shot interrupt request mask bit 5 ssimk5 slot 5 single-shot interrupt request mask bit 6 ssimk6 slot 6 single-shot interrupt request mask bit 7 ssimk7 slot 7 single-shot interrupt request mask bit 8 ssimk8 slot 8 single-shot interrupt request mask bit 9 ssimk9 slot 9 single-shot interrupt request mask bit 10 ssimk10 slot 10 single-shot interrupt request mask bit 11 ssimk11 slot 11 single-shot interrupt request mask bit 12 ssimk12 slot 12 single-shot interrupt request mask bit 13 ssimk13 slot 13 single-shot interrupt request mask bit 14 ssimk14 slot 14 single-shot interrupt request mask bit 15 ssimk15 slot 15 single-shot interrupt request mask bit this register is used to enable or disable the interrupt requests that will be generated when transmission in each corresponding slot has failed. setting any bit in this register to "1" enables the interrupt request to be generated when transmission in the corresponding slot (in single-shot mode only) has failed. the can single-shot inter- rupt request status register helps to know which slot requested the interrupt.
13-35 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module f/f f/f f/f f/f f/f f/f f/f f/f irb7 ssb7 irb6 ssb6 irb5 ssb5 irb4 ssb4 f/f f/f irb3 ssb3 f/f f/f irb2 ssb2 f/f f/f irb1 ssb1 f/f f/f irb0 ssb0 b7 b7 b6 b6 b5 b5 b4 b4 b3 b3 b2 b2 b1 b1 b0 b0 data bus slot 0 transmission/reception completed slot 1 transmission/reception completed slot 2 transmission/reception completed slot 3 transmission/reception completed slot 4 transmission/reception completed slot 5 transmission/reception completed slot 6 transmission/reception completed slot 7 transmission/reception completed to the remaining 27-source inputs in the succeeding pages can0 transmit/receive & error interrupt request (level) 35-source inputs can0slist (h'0080 100c) can0slimk (h'0080 1010) figure 13.2.3 block diagram of can0 transmit/receive & error interrupt requests (1/5)
13 13-36 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers f/f f/f f/f f/f f/f f/f f/f f/f irb15 ssb15 irb14 ssb14 irb13 ssb13 irb12 ssb12 f/f f/f irb11 ssb11 f/f f/f irb10 ssb10 f/f f/f irb9 ssb9 f/f f/f irb8 ssb8 b15 b15 b14 b14 b13 b13 b12 b12 b11 b11 b10 b10 b9 b9 b8 b8 data bus slot 8 transmission/reception completed slot 9 transmission/reception completed slot 10 transmission/reception completed slot 11 transmission/reception completed slot 12 transmission/reception completed slot 13 transmission/reception completed slot 14 transmission/reception completed slot 15 transmission/reception completed to the preceding page (level) 27-source inputs can0slist (h'0080 100c) can0slimk (h'0080 1010) to the remaining 19-source inputs in the succeeding pages figure 13.2.4 block diagram of can0 transmit/receive & error interrupt requests (2/5)
13-37 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module figure 13.2.5 block diagram of can0 transmit/receive & error interrupt requests (3/5) f/f f/f oim ois f/f f/f pim pis f/f f/f eim eis b15 b7 b14 b6 b13 b5 data bus can bus error occurs go to error passive state go to bus off state to the preceding page (level) 19-source inputs can0erist (h'0080 1014) can0erimk (h'0080 1015) to the remaining 16-source inputs in the succeeding pages
13 13-38 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers f/f f/f f/f f/f f/f f/f f/f f/f ssimk7 ssist7 ssimk6 ssist6 ssimk5 ssist5 ssimk4 ssist4 f/f f/f ssimk3 ssist3 f/f f/f ssimk2 ssist2 f/f f/f ssimk1 ssist1 f/f f/f ssimk0 ssist0 b7 b7 b6 b6 b5 b5 b4 b4 b3 b3 b2 b2 b1 b1 b0 b0 data bus slot 0 arbitration-lost/transmit error occurs slot 1 arbitration-lost/transmit error occurs slot 2 arbitration-lost/transmit error occurs slot 3 arbitration-lost/transmit error occurs slot 4 arbitration-lost/transmit error occurs slot 5 arbitration-lost/transmit error occurs slot 6 arbitration-lost/transmit error occurs slot 7 arbitration-lost/transmit error occurs to the preceding page (level) 16-source inputs can0ssist (h'0080 1044) can0ssimk (h'0080 1048) to the remaining 8-source inputs in the next page figure 13.2.6 block diagram of can0 transmit/receive & error interrupt requests (4/5)
13-39 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module figure 13.2.7 block diagram of can0 transmit/receive & error interrupt requests (5/5) f/f f/f f/f f/f f/f f/f f/f f/f ssimk15 ssist15 ssimk14 ssist14 ssimk13 ssist13 ssimk12 ssist12 f/f f/f ssimk11 ssist11 f/f f/f ssimk10 ssist10 f/f f/f ssimk9 ssist9 f/f f/f ssimk8 ssist8 b15 b15 b14 b14 b13 b13 b12 b12 b11 b11 b10 b10 b9 b9 b8 b8 data bus slot 8 arbitration-lost/transmit error occurs slot 9 arbitration-lost/transmit error occurs slot 10 arbitration-lost/transmit error occurs slot 11 arbitration-lost/transmit error occurs slot 12 arbitration-lost/transmit error occurs slot 13 arbitration-lost/transmit error occurs slot 14 arbitration-lost/transmit error occurs slot 15 arbitration-lost/transmit error occurs to the preceding page (level) 8-source inputs can0ssist (h'0080 1044) can0ssimk (h'0080 1048)
13 13-40 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers figure 13.2.8 block diagram of can1 transmit/receive & error interrupt requests (1/5) f/f f/f f/f f/f f/f f/f f/f f/f irb7 ssb7 irb6 ssb6 irb5 ssb5 irb4 ssb4 f/f f/f irb3 ssb3 f/f f/f irb2 ssb2 f/f f/f irb1 ssb1 f/f f/f irb0 ssb0 b7 b7 b6 b6 b5 b5 b4 b4 b3 b3 b2 b2 b1 b1 b0 b0 data bus slot 0 transmission/reception completed slot 1 transmission/reception completed slot 2 transmission/reception completed slot 3 transmission/reception completed slot 4 transmission/reception completed slot 5 transmission/reception completed slot 6 transmission/reception completed slot 7 transmission/reception completed to the remaining 27-source inputs in the succeeding pages can1 transmit/receive & error interrupt request (level) 35-source inputs can1slist (h'0080 140c) can1slimk (h'0080 1410)
13-41 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module f/f f/f f/f f/f f/f f/f f/f f/f irb15 ssb15 irb14 ssb14 irb13 ssb13 irb12 ssb12 f/f f/f irb11 ssb11 f/f f/f irb10 ssb10 f/f f/f irb9 ssb9 f/f f/f irb8 ssb8 b15 b15 b14 b14 b13 b13 b12 b12 b11 b11 b10 b10 b9 b9 b8 b8 data bus slot 8 transmission/reception completed slot 9 transmission/reception completed slot 10 transmission/reception completed slot 11 transmission/reception completed slot 12 transmission/reception completed slot 13 transmission/reception completed slot 14 transmission/reception completed slot 15 transmission/reception completed to the preceding page (level) 27-source inputs can1slist (h'0080 140c) can1slimk (h'0080 1410) to the remaining 19-source inputs in the succeeding pages figure 13.2.9 block diagram of can1 transmit/receive & error interrupt requests (2/5)
13 13-42 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers figure 13.2.10 block diagram of can1 transmit/receive & error interrupt requests (3/5) f/f f/f oim ois f/f f/f pim pis f/f f/f eim eis b15 b7 b14 b6 b13 b5 data bus can bus error occurs go to error passive state go to bus off state to the preceding page (level) 19-source inputs can1erist (h'0080 1414) can1erimk (h'0080 1415) to the remaining 16-source inputs in the succeeding pages
13-43 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module figure 13.2.11 block diagram of can1 transmit/receive & error interrupt requests (4/5) f/f f/f f/f f/f f/f f/f f/f f/f ssimk7 ssist7 ssimk6 ssist6 ssimk5 ssist5 ssimk4 ssist4 f/f f/f ssimk3 ssist3 f/f f/f ssimk2 ssist2 f/f f/f ssimk1 ssist1 f/f f/f ssimk0 ssist0 b7 b7 b6 b6 b5 b5 b4 b4 b3 b3 b2 b2 b1 b1 b0 b0 data bus slot 0 arbitration-lost/transmit error occurs slot 1 arbitration-lost/transmit error occurs slot 2 arbitration-lost/transmit error occurs slot 3 arbitration-lost/transmit error occurs slot 4 arbitration-lost/transmit error occurs slot 5 arbitration-lost/transmit error occurs slot 6 arbitration-lost/transmit error occurs slot 7 arbitration-lost/transmit error occurs to the remaining 8-source inputs in the next page to the preceding pag e (level) 16-source inputs can1ssist (h'0080 1444) can1ssimk (h'0080 1488)
13 13-44 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers figure 13.2.12 block diagram of can1 transmit/receive & error interrupt requests (5/5) f/f f/f f/f f/f f/f f/f f/f f/f ssimk15 ssist15 ssimk14 ssist14 ssimk13 ssist13 ssimk12 ssist12 f/f f/f ssimk11 ssist11 f/f f/f ssimk10 ssist10 f/f f/f ssimk9 ssist9 f/f f/f ssimk8 ssist8 b15 b15 b14 b14 b13 b13 b12 b12 b11 b11 b10 b10 b9 b9 b8 b8 data bus slot 8 arbitration-lost/transmit error occurs slot 9 arbitration-lost/transmit error occurs slot 10 arbitration-lost/transmit error occurs slot 11 arbitration-lost/transmit error occurs slot 12 arbitration-lost/transmit error occurs slot 13 arbitration-lost/transmit error occurs slot 14 arbitration-lost/transmit error occurs slot 15 arbitration-lost/transmit error occurs to the preceding page (level) 8-source inputs can1ssist (h'0080 1444) can1ssimk (h'0080 1488)
13-45 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module 13.2.9 can cause of error registers can0 cause of error register (can0ef) can1 cause of error register (can1ef) 9 10 11 12 13 14 b15 b8 bite1 bite0 stfe forme crce acke 00000000 rcve tre b bit name function r w 8 tre 0: error not detected r (note 1) transmit error detection bit 1: transmit error detected 9 rcve 0: error not detected r (note 1) receive error detection bit 1: receive error detected 10 bite0 0: no bit error is detected r (note 1) "0" sending bit error detection bit 1: bit error is detected when sending a "0" 11 bite1 0: no bit error is detected r (note 1) "1" sending bit error detection bit 1: bit error is detected when sending a "1" 12 stfe 0: error not detected r (note 1) stuff error detection bit 1: stuff error detected 13 forme 0: error not detected r (note 1) form error detection bit 1: form error detected 14 crce 0: error not detected r (note 1) crc error detection bit 1: crc error detected 15 acke 0: error not detected r (note 1) ack error detection bit 1: ack error detected note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the status it had before the write. this register indicates error information when a communication error occurred. each bit in this register is set every time a communication error is detected, and is not cleared unless a program writes a "0" to the relevant bit. (1) tre (transmit error detection) bit (bit 8) this bit is set to "1" when a communication error is detected while operating as a transmit node. the bit is cleared by writing a "0" in software. (2) rcve (receive error detection) bit (bit 9) this bit is set to "1" when a communication error is detected while operating as a receive node. the bit is cleared by writing a "0" in software. (3) bite0 ("0" sending bit error detection) bit (bit 10) this bit is set to "1" when a bit error is detected while sending a "0" from ctx. the bit is cleared by writing a "0" in software. (4) bite1 ("1" sending bit error detection) bit (bit 11) this bit is set to "1" when a bit error is detected while sending a "1" from ctx. the bit is cleared by writing a "0" in software.
13 13-46 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers (5) stfe (stuff error detection) bit (bit 12) this bit is set to "1" when a stuff error was detected. the bit is cleared by writing a "0" in software. (6) forme (form error detection) bit (bit 13) this bit is set to "1" when a form error was detected. the bit is cleared by writing a "0" in software. (7) crce (crc error detection) bit (bit 14) this bit is set to "1" when a crc error was detected. the bit is cleared by writing a "0" in software. (8) acke (ack error detection) bit (bit 15) this bit is set to "1" when an ack error was detected. the bit is cleared by writing a "0" in software note: ? depending on the error status, two or more bits may be set at the same time.
13-47 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module crx pin ctx pin self-diagnostic mode ack signal generating circuit rx tx m32r/ecu can module 13.2.10 can mode registers can0 mode register (can0mod) can1 mode register (can1mod) 123456b7 b0 cmod 00 0 0 0 0 0 0 b bit name function r w 0?5 no function assigned. fix to "0". 00 6?7 cmod 00: normal mode r w can operation mode select bit 01: bus monitor mode 10: self-diagnostic mode 11: settings inhibited (1) cmod (can operation mode select) bits (bit 6, bit 7) these bits select the can operation mode. ? normal operation mode normal transmit/receive operations can be performed. ? bus monitor mode only receive operation is performed. during bus monitor mode, the ctx output is fixed high and neither ack nor an error frame can be returned. note: ? during bus monitor mode, issuing transmit requests is inhibited. the ack bit is handled as ?don?t care? during bus monitor mode. therefore, if all bits of data including the crc delim- iter are received normally, it is assumed that data has been received normally no matter whether the ack bit is high. ? self-diagnostic mode ctx and crx are connected together internally in the can module. when combined with loopback mode, this mode allows communication to be performed within the can module alone. during self- diagnostic mode, the ctx pin output is fixed high even when transmitting. figure 13.2.13 conceptual diagram of self-diagnostic mode
13 13-48 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers 13.2.11 can dma transfer request select registers can0 dma transfer request select register (can0dmarq) can1 dma transfer request select register (can1dmarq) 9 10 11 12 13 14 b15 b8 cdmsel1 cdmsel0 00 0 0 0 0 0 0 b bit name function r w 8?13 no function assigned. fix to "0". 00 14 cdmsel1 0: slot 1 transmission failed r w can dma1 transfer request source select bit 1: slot 14 transmission/reception completed 15 cdmsel0 0: slot 0 transmission failed r w can dma0 transfer request source select bit 1: slot 15 transmission/reception completed can0 and 1 can generate dma transfer requests. this register is used to select the cause or source of that request. (1) cdmsel1 (can dma1 transfer request source select) bit (bit 14) this bit selects one of the following two as the cause or source of a transfer request to dma7 and dma9. ? slot 1 transmission failed if the cdmsel1 bit is set to "0", a transfer request is generated when transmission in slot 1 has failed for reasons of arbitration-lost or transmit error. ? slot 14 transmission/reception completed if the cdmsel1 bit is set to "1", a transfer request is generated when transmission/reception in slot 14 is completed. notes: ? if slot 14 has been set for remote frame transmission, a dma transfer request is generated when remote frame transmission is completed as well as when data frame reception is completed. ? if slot 14 has been set for remote frame reception (automatic response), a dma transfer request is generated when remote frame reception is completed as well as when data frame transmission is completed. (2) cdmsel0 (can dma0 transfer request source select) bit (bit 15) this bit selects one of the following two as the cause or source of a transfer request to dma6 and dma8. ? slot 0 transmission failed if the cdmsel0 bit is set to "0", a transfer request is generated when transmission in slot 0 has failed for reasons of arbitration-lost or transmit error. ? slot 15 transmission/reception completed if the cdmsel0 bit is set to "1", a transfer request is generated when transmission/reception in slot 15 is completed. notes: ? if slot 15 has been set for remote frame transmission, a dma transfer request is generated when remote frame transmission is completed as well as when data frame reception is completed. ? if slot 15 has been set for remote frame reception (automatic response), a dma transfer request is generated when remote frame reception is completed as well as when data frame transmission is completed.
13-49 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module 13.2.12 can mask registers can0 global mask register standard id0 (c0gmsks0) can0 local mask register a standard id0 (c0lmskas0) can0 local mask register b standard id0 (c0lmskbs0) can1 global mask register standard id0 (c1gmsks0) can1 local mask register a standard id0 (c1lmskas0) can1 local mask register b standard id0 (c1lmskbs0) 123456b7 b0 sid0m sid1m sid2m sid3m sid4m 00000 0 0 0 b bit name function r w 0?2 no function assigned. fix to "0". 00 3?7 sid0m?sid4m 0: id not checked r w (standard mask id0?standard mask id4) 1: id checked can0 global mask register standard id1 (c0gmsks1) can0 local mask register a standard id1 (c0lmskas1) can0 local mask register b standard id1 (c0lmskbs1) can1 global mask register standard id1 (c1gmsks1) can1 local mask register a standard id1 (c1lmskas1) can1 local mask register b standard id1 (c1lmskbs1) 9 10 11 12 13 14 b15 b8 sid6m sid5m sid7m sid8m sid9m sid10m 000000 0 0 b bit name function r w 8?9 no function assigned. fix to "0". 00 10?15 sid5m?sid10m 0: id not checked r w (standard mask id5?standard mask id10) 1: id checked three mask registers are used in acceptance filtering: global mask register, local mask register a and local mask register b. the global mask register is used for message slots 0-13, while local mask registers a and b are used for message slots 14 and 15, respectively. ? if any bit in this register is set to "0", the corresponding id bit is masked (assumed to have matched) during acceptance filtering. ? if any bit in this register is set to "1", the corresponding id bit is compared with the receive id during acceptance filtering and when it matches the id set in the message slot, the received data is stored in it. notes: ? sid0m corresponds to the msb of the standard id. ? the global mask register can only be modified when none of slots 0-13 have receive requests set. ? the local mask register a can only be modified when slot 14 does not have a receive request set. ? the local mask register b can only be modified when slot 15 does not have a receive request set.
13 13-50 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 global mask register extended id0 (c0gmske0) can0 local mask register a extended id0 (c0lmskae0) can0 local mask register b extended id0 (c0lmskbe0) can1 global mask register extended id0 (c1gmske0) can1 local mask register a extended id0 (c1lmskae0) can1 local mask register b extended id0 (c1lmskbe0) 123456b7 b0 eid1m eid0m eid2m eid3m 0000 0 0 0 0 b bit name function r w 0?3 no function assigned. fix to "0". 00 4?7 eid0m?eid3m 0: id not checked r w (extended mask id0?extended mask id3) 1: id checked can0 global mask register extended id1 (c0gmske1) can0 local mask register a extended id1 (c0lmskae1) can0 local mask register b extended id1 (c0lmskbe1) can1 global mask register extended id1 (c1gmske1) can1 local mask register a extended id1 (c1lmskae1) can1 local mask register b extended id1 (c1lmskbe1) 9 1011121314b15 b8 eid6m eid5m eid4m eid7m eid8m eid9m eid10m eid11m 00000000 b bit name function r w 8?15 eid4m?eid11m 0: id not checked r w (extended mask id4?extended mask id11) 1: id checked
13-51 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 global mask register extended id2 (c0gmske2) can0 local mask register a extended id2 (c0lmskae2) can0 local mask register b extended id2 (c0lmskbe2) can1 global mask register extended id2 (c1gmske2) can1 local mask register a extended id2 (c1lmskae2) can1 local mask register b extended id2 (c1lmskbe2) 123456b7 b0 eid12m eid13m eid14m eid15m eid16m eid17m 000000 0 0 b bit name function r w 0,1 no function assigned. fix to "0". 00 2?7 eid12m?eid17m 0: id not checked r w (extended mask id12?extended mask id17) 1: id checked three mask registers are used in acceptance filtering: global mask register, local mask register a and local mask register b. the global mask register is used for message slots 0-13, while local mask registers a and b are used for message slots 14 and 15, respectively. ? if any bit in this register is set to "0", the corresponding id bit is masked (assumed to have matched) during acceptance filtering. ? if any bit in this register is set to "1", the corresponding id bit is compared with the receive id during acceptance filtering and when it matches the id set in the message slot, the received data is stored in it. notes: ? eid0m corresponds to the msb of the extended id. ? the global mask register can only be modified when none of slots 0-13 have receive requests set. ? the local mask register a can only be modified when slot 14 does not have a receive request set. ? the local mask register b can only be modified when slot 15 does not have a receive request set.
13 13-52 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers slot 0 slot 1 slot 2 slot 13 slot 14 slot 15 slots controlled by the global mask register slot controlled by local mask register a slot controlled by local mask register b id of received frame id set in slot mask register set value 0: the received message and slot ids are not checked for matching and handled as "don't care" (masked) 1: the received message and slot ids are checked for matching mask bit value acceptance judgment signal acceptance judgment signal 0: the received message is ignored (not stored in any slot) 1: the received message is stored in the slot that has the matching id figure 13.2.14 relationship between the mask registers and the controlled slots figure 13.2.15 concept of acceptance filtering
13-53 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module 13.2.13 can single-shot mode control registers can0 single-shot mode control register (can0ssmode) can1 single-shot mode control register (can1ssmode) b01234567891011121314b15 sscnt0 sscnt1 sscnt2 sscnt3 sscnt4 sscnt5 sscnt6 sscnt7 sscnt8 sscnt9 sscnt10 sscnt11 sscnt12 sscnt13 sscnt14 sscnt15 0000000000000000 b bit name function r w 0 sscnt0 (slot 0 single-shot mode bit) 0: normal mode r w 1 sscnt1 (slot 1 single-shot mode bit) 1: single-shot mode 2 sscnt2 (slot 2 single-shot mode bit) 3 sscnt3 (slot 3 single-shot mode bit) 4 sscnt4 (slot 4 single-shot mode bit) 5 sscnt5 (slot 5 single-shot mode bit) 6 sscnt6 (slot 6 single-shot mode bit) 7 sscnt7 (slot 7 single-shot mode bit) 8 sscnt8 (slot 8 single-shot mode bit) 9 sscnt9 (slot 9 single-shot mode bit) 10 sscnt10 (slot 10 single-shot mode bit) 11 sscnt11 (slot 11 single-shot mode bit) 12 sscnt12 (slot 12 single-shot mode bit) 13 sscnt13 (slot 13 single-shot mode bit) 14 sscnt14 (slot 14 single-shot mode bit) 15 sscnt15 (slot 15 single-shot mode bit) normally in can, if transmission has failed for reasons of arbitration-lost or transmit error, the transmit operation is continued until successfully transmitted. this register is used to specify for each slot whether or not to retry a transmit operation in such a case. in single-shot mode, if transmission fails for reasons of arbitration-lost or transmit error, the transmit operation is not retried. if any bit in this register is set to "1", the corresponding slot operates in single-shot mode. note: ? settings of this register can only be changed when the message slot control register for the slot whose corresponding bit is to be modified is in the h?00 state.
13 13-54 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers 13.2.14 can message slot control registers can0 message slot 0 control register (c0msl0cnt) can0 message slot 1 control register (c0msl1cnt) can0 message slot 2 control register (c0msl2cnt) can0 message slot 3 control register (c0msl3cnt) can0 message slot 4 control register (c0msl4cnt) can0 message slot 5 control register (c0msl5cnt) can0 message slot 6 control register (c0msl6cnt) can0 message slot 7 control register (c0msl7cnt) can0 message slot 8 control register (c0msl8cnt) can0 message slot 9 control register (c0msl9cnt) can0 message slot 10 control register (c0msl10cnt) can0 message slot 11 control register (c0msl11cnt) can0 message slot12 control register (c0msl12cnt) can0 message slot 13 control register (c0msl13cnt) can0 message slot 14 control register (c0msl14cnt) can0 message slot 15 control register (c0msl15cnt) can1 message slot 0 control register (c1msl0cnt) can1 message slot 1 control register (c1msl1cnt) can1 message slot 2 control register (c1msl2cnt) can1 message slot 3 control register (c1msl3cnt) can1 message slot 4 control register (c1msl4cnt) can1 message slot 5 control register (c1msl5cnt) can1 message slot 6 control register (c1msl6cnt) can1 message slot 7 control register (c1msl7cnt) can1 message slot 8 control register (c1msl8cnt) can1 message slot 9 control register (c1msl9cnt) can1 message slot 10 control register (c1msl10cnt) can1 message slot 11 control register (c1msl11cnt) can1 message slot 12 control register (c1msl12cnt) can1 message slot 13 control register (c1msl13cnt) can1 message slot 14 control register (c1msl14cnt) can1 message slot 15 control register (c1msl15cnt)
13-55 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module 123456b7 (b15) (b8) b0 rm rr tr rl ra ml trstat trfin 00000000 b bit name function r w 0 (8) tr 0: do not use the message slot as transmit slot r w transmit request bit 1: use the message slot as transmit slot 1 (9) rr 0: do not use the message slot as receive slot r w receive request bit 1: use the message slot as receive slot 2 (10) rm 0: transmit/receive data frame r w remote bit 1: transmit/receive remote frame 3 (11) rl 0: enable automatic response for remote frame r w automatic response inhibit bit 1: disable automatic response for remote frame 4 (12) ra during basiccan mode r ? remote active bit 0: receive data frame (status) 1: receive remote frame (status) during normal mode 0: data frame 1: remote frame 5 (13) ml 0: no message was lost r(note 1) message lost bit 1: message was lost 6 (14) trstat during a transmit slot r ? transmit/receive status bit 0: transmission idle 1: transmit request accepted during a receive slot 0: reception idle 1: storing received data 7 (15) trfin during a transmit slot r(note 1) transmission/reception finished bit 0: not transmitted yet 1: finished transmitting during a receive slot 0: not received yet 1: finished receiving note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the status it had before the write. notes: ? if a transmit request is written to this register while the can module is reset (canncnt frst or rst bit = "1"), it starts sending upon detecting 11 consecutive recessive bits on the can bus after exiting the reset state. ? if data/remote frame transmit requests are issued for two or more slots, the slot with the small- est slot number sends a frame. if data/remote frame receive requests are issued for two or more slots, the slot with the smallest slot number among the slots satisfying the receive condi- tion receives a frame. ? if transmission failed when single-shot mode is selected, this register is cleared to h?00. (1) tr (transmit request) bit (bit 0), (bit 8) to use the message slot as a transmit slot, set this bit to "1". to use the message slot as a data frame or remote frame receive slot, set this bit to "0".
13 13-56 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers (2) rr (receive request) bit (bit 1), (bit 9) to use the message slot as a receive slot, set this bit to "1". to use the message slot as a data frame or remote frame transmit slot, set this bit to "0". if tr (transmit request) bit and rr (receive request) bit both are set to "1", device operation is undefined. (3) rm (remote) bit (bit 2), (bit 10) to handle remote frames in the message slot, set this bit to "1". there are following two methods of settings to handle remote frames: ? set for remote frame transmission the data set in the message slot is transmitted as a remote frame. when the can module finished sending, the slot automatically changes to a data frame receive slot. however, if a data frame is received before the can module finished sending a remote frame, the received data is stored in the message slot and the remote frame is not transmitted. ? set for remote frame reception remote frames are received. the processing to be performed after receiving a remote frame is selected by rl (automatic response inhibit) bit. (4) rl (automatic response inhibit) bit (bit 3), (bit 11) this bit is effective when the message slot has been set as a remote frame receive slot. it selects the processing to be performed after receiving a remote frame. if this bit is set to "0", the message slot automati- cally changes to a transmit slot after receiving a remote frame and transmits the data set in it as a data frame. if this bit is set to "1", the message slot stops operating after receiving a remote frame. note: ? always set this bit to "0" unless the message slot is set for remote frame reception. (5) ra (remote active) bit (bit 4), (bit 12) this bit functions differently for slots 0-13 and slots 14 and 15. ? slots 0?13 this bit is set to "1" when the message slot is set for remote frame transmission (reception). then, when remote frame transmission (reception) is completed, the bit is cleared to "0". ? slots 14 and 15 the function of this bit differs depending on how the can control register bcm (basiccan mode) bit is set. if bcm = "0" (normal operation), this bit is set to "1" when the message slot is set for remote frame transmission (reception). if bcm = "1" (basiccan), this bit indicates which type of frame is received. during basiccan mode, the received data is stored in slots 14 and 15 for both data and remote frames. if ra = "0", it means that the frame stored in the slot is a data frame. if ra = "1", it means that the frame stored in the slot is a remote frame. (6) ml (message lost) bit (bit 5), (bit 13) this bit is effective for receive slots. it is set to "1" when unread received data contained in the message slot is overwritten by reception. this bit is cleared by writing "0" in software.
13-57 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module (7) trstat (transmit/receive status) bit (bit 6), (bit 14) this bit indicates that the can module is sending or receiving and is accessing the message slot. this bit is set to "1" when the can module is accessing, and set to "0" when not accessing. ? during a transmit slot this bit is set to "1" when a transmit request for the message slot is accepted. it is cleared to "0" when the can module lost in bus arbitration, when a can bus error occurs, or when transmission is completed. ? during a receive slot this bit is set to "1" while the can module is receiving data, with the received data being stored in the message slot. note that the value read from the message slot while the trstat bit remains set is undefined. (8) trfin (transmit/receive finished) bit (bit 7), (bit 15) this bit indicates that the can module finished sending or receiving. ? when set for a transmit slot this bit is set to "1" when the can module finished sending the data stored in the message slot. this bit is cleared by writing "0" in software. however, it cannot be cleared when the trstat (transmit/ receive status) bit = "1". ? when set for a receive slot this bit is set to "1" when the can module finished receiving normally the data to be stored in the message slot. this bit is cleared by writing "0" in software. however, it cannot be cleared when the trstat (transmit/receive status) bit = "1". notes: ? before reading the received data out of the message slot, be sure to clear the trfin (transmit/receive finished) bit to "0". if the trfin (transmit/receive finished) bit hap- pens to be set to "1" after a read, it means that new received data was stored while reading and the read data contains an undefined value. in that case, discard the read data, clear the trfin bit to "0" and read out data again. ? when sending/receiving remote frames, the trfin bit is automatically cleared to "0" by hardware. therefore, the trfin bit cannot be used as a transmission/reception-finished flag.
13 13-58 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers 13.2.15 can message slots can0 message slot 0 standard id0 (c0msl0sid0) can0 message slot 1 standard id0 (c0msl1sid0) can0 message slot 2 standard id0 (c0msl2sid0) can0 message slot 3 standard id0 (c0msl3sid0) can0 message slot 4 standard id0 (c0msl4sid0) can0 message slot 5 standard id0 (c0msl5sid0) can0 message slot 6 standard id0 (c0msl6sid0) can0 message slot 7 standard id0 (c0msl7sid0) can0 message slot 8 standard id0 (c0msl8sid0) can0 message slot 9 standard id0 (c0msl9sid0) can0 message slot 10 standard id0 (c0msl10sid0) can0 message slot 11 standard id0 (c0msl11sid0) can0 message slot 12 standard id0 (c0msl12sid0) can0 message slot 13 standard id0 (c0msl13sid0) can0 message slot 14 standard id0 (c0msl14sid0) can0 message slot 15 standard id0 (c0msl15sid0) can1 message slot 0 standard id0 (c1msl0sid0) can1 message slot 1 standard id0 (c1msl1sid0) can1 message slot 2 standard id0 (c1msl2sid0) can1 message slot 3 standard id0 (c1msl3sid0) can1 message slot 4 standard id0 (c1msl4sid0) can1 message slot 5 standard id0 (c1msl5sid0) can1 message slot 6 standard id0 (c1msl6sid0) can1 message slot 7 standard id0 (c1msl7sid0) can1 message slot 8 standard id0 (c1msl8sid0) can1 message slot 9 standard id0 (c1msl9sid0) can1 message slot 10 standard id0 (c1msl10sid0) can1 message slot 11 standard id0 (c1msl11sid0) can1 message slot 12 standard id0 (c1msl12sid0) can1 message slot 13 standard id0 (c1msl13sid0) can1 message slot 14 standard id0 (c1msl14sid0) can1 message slot 15 standard id0 (c1msl15sid0) 123456b7 b0 sid1 sid0 sid2 sid3 sid4 ????? ? ? ? b bit name function r w 0?2 no function assigned. fix to "0". 00 3?7 sid0?sid4 standard id0?standard id4 r w (standard id0?standard id4) these registers are the memory space for transmit and receive frames.
13-59 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 message slot 0 standard id1 (c0msl0sid1) can0 message slot 1 standard id1 (c0msl1sid1) can0 message slot 2 standard id1 (c0msl2sid1) can0 message slot 3 standard id1 (c0msl3sid1) can0 message slot 4 standard id1 (c0msl4sid1) can0 message slot 5 standard id1 (c0msl5sid1) can0 message slot 6 standard id1 (c0msl6sid1) can0 message slot 7 standard id1 (c0msl7sid1) can0 message slot 8 standard id1 (c0msl8sid1) can0 message slot 9 standard id1 (c0msl9sid1) can0 message slot 10 standard id1 (c0msl10sid1) can0 message slot 11 standard id1 (c0msl11sid1) can0 message slot 12 standard id1 (c0msl12sid1) can0 message slot 13 standard id1 (c0msl13sid1) can0 message slot 14 standard id1 (c0msl14sid1) can0 message slot 15 standard id1 (c0msl15sid1) can1 message slot 0 standard id1 (c1msl0sid1) can1 message slot 1 standard id1 (c1msl1sid1) can1 message slot 2 standard id1 (c1msl2sid1) can1 message slot 3 standard id1 (c1msl3sid1) can1 message slot 4 standard id1 (c1msl4sid1) can1 message slot 5 standard id1 (c1msl5sid1) can1 message slot 6 standard id1 (c1msl6sid1) can1 message slot 7 standard id1 (c1msl7sid1) can1 message slot 8 standard id1 (c1msl8sid1) can1 message slot 9 standard id1 (c1msl9sid1) can1 message slot 10 standard id1 (c1msl10sid1) can1 message slot 11 standard id1 (c1msl11sid1) can1 message slot 12 standard id1 (c1msl12sid1) can1 message slot 13 standard id1 (c1msl13sid1) can1 message slot 14 standard id1 (c1msl14sid1) can1 message slot 15 standard id1 (c1msl15sid1) 9 10 11 12 13 14 b15 b8 sid7 sid6 sid5 sid8 sid9 sid10 ?????? ? ? b bit name function r w 8, 9 no function assigned. fix to "0". 00 10?15 sid5?sid10 standard id5?standard id10 r w (standard id5?standard id10) these registers are the memory space for transmit and receive frames.
13 13-60 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 message slot 0 extended id0 (c0msl0eid0) can0 message slot 1 extended id0 (c0msl1eid0) can0 message slot 2 extended id0 (c0msl2eid0) can0 message slot 3 extended id0 (c0msl3eid0) can0 message slot 4 extended id0 (c0msl4eid0) can0 message slot 5 extended id0 (c0msl5eid0) can0 message slot 6 extended id0 (c0msl6eid0) can0 message slot 7 extended id0 (c0msl7eid0) can0 message slot 8 extended id0 (c0msl8eid0) can0 message slot 9 extended id0 (c0msl9eid0) can0 message slot 10 extended id0 (c0msl10eid0) can0 message slot 11 extended id0 (c0msl11eid0) can0 message slot 12 extended id0 (c0msl12eid0) can0 message slot 13 extended id0 (c0msl13eid0) can0 message slot 14 extended id0 (c0msl14eid0) can0 message slot 15 extended id0 (c0msl15eid0) can1 message slot 0 extended id0 (c1msl0eid0) can1 message slot 1 extended id0 (c1msl1eid0) can1 message slot 2 extended id0 (c1msl2eid0) can1 message slot 3 extended id0 (c1msl3eid0) can1 message slot 4 extended id0 (c1msl4eid0) can1 message slot 5 extended id0 (c1msl5eid0) can1 message slot 6 extended id0 (c1msl6eid0) can1 message slot 7 extended id0 (c1msl7eid0) can1 message slot 8 extended id0 (c1msl8eid0) can1 message slot 9 extended id0 (c1msl9eid0) can1 message slot 10 extended id0 (c1msl10eid0) can1 message slot 11 extended id0 (c1msl11eid0) can1 message slot 12 extended id0 (c1msl12eid0) can1 message slot 13 extended id0 (c1msl13eid0) can1 message slot 14 extended id0 (c1msl14eid0) can1 message slot 15 extended id0 (c1msl15eid0) 123456b7 b0 eid1 eid0 eid2 eid3 ???? ? ? ? ? b bit name function r w 0?3 no function assigned. fix to "0". 00 4?7 eid0?eid3 extended id0?extended id3 r w (extended id0?extended id3) these registers are the memory space for transmit and receive frames. note: ? if the message slot is set for the receive slot standard id format, an undefined value is written to the eid bits when storing received data.
13-61 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 message slot 0 extended id1 (c0msl0eid1) can0 message slot 1 extended id1 (c0msl1eid1) can0 message slot 2 extended id1 (c0msl2eid1) can0 message slot 3 extended id1 (c0msl3eid1) can0 message slot 4 extended id1 (c0msl4eid1) can0 message slot 5 extended id1 (c0msl5eid1) can0 message slot 6 extended id1 (c0msl6eid1) can0 message slot 7 extended id1 (c0msl7eid1) can0 message slot 8 extended id1 (c0msl8eid1) can0 message slot 9 extended id1 (c0msl9eid1) can0 message slot 10 extended id1 (c0msl10eid1) can0 message slot 11 extended id1 (c0msl11eid1) can0 message slot 12 extended id1 (c0msl12eid1) can0 message slot 13 extended id1 (c0msl13eid1) can0 message slot 14 extended id1 (c0msl14eid1) can0 message slot 15 extended id1 (c0msl15eid1) can1 message slot 0 extended id1 (c1msl0eid1) can1 message slot 1 extended id1 (c1msl1eid1) can1 message slot 2 extended id1 (c1msl2eid1) can1 message slot 3 extended id1 (c1msl3eid1) can1 message slot 4 extended id1 (c1msl4eid1) can1 message slot 5 extended id1 (c1msl5eid1) can1 message slot 6 extended id1 (c1msl6eid1) can1 message slot 7 extended id1 (c1msl7eid1) can1 message slot 8 extended id1 (c1msl8eid1) can1 message slot 9 extended id1 (c1msl9eid1) can1 message slot 10 extended id1 (c1msl10eid1) can1 message slot 11 extended id1 (c1msl11eid1) can1 message slot 12 extended id1 (c1msl12eid1) can1 message slot 13 extended id1 (c1msl13eid1) can1 message slot 14 extended id1 (c1msl14eid1) can1 message slot 15 extended id1 (c1msl15eid1) 9 1011121314b15 b8 eid6 eid5 eid4 eid7 eid8 eid9 eid10 eid11 ???????? b bit name function r w 8?15 eid4?eid11 extended id4?extended id11 r w (extended id4?extended id11) these registers are the memory space for transmit and receive frames. note: ? if the message slot is set for the receive slot standard id format, an undefined value is written to the eid bits when storing received data.
13 13-62 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 message slot 0 extended id2 (c0msl0eid2) can0 message slot 1 extended id2 (c0msl1eid2) can0 message slot 2 extended id2 (c0msl2eid2) can0 message slot 3 extended id2 (c0msl3eid2) can0 message slot 4 extended id2 (c0msl4eid2) can0 message slot 5 extended id2 (c0msl5eid2) can0 message slot 6 extended id2 (c0msl6eid2) can0 message slot 7 extended id2 (c0msl7eid2) can0 message slot 8 extended id2 (c0msl8eid2) can0 message slot 9 extended id2 (c0msl9eid2) can0 message slot 10 extended id2 (c0msl10eid2) can0 message slot 11 extended id2 (c0msl11eid2) can0 message slot 12 extended id2 (c0msl12eid2) can0 message slot 13 extended id2 (c0msl13eid2) can0 message slot 14 extended id2 (c0msl14eid2) can0 message slot 15 extended id2 (c0msl15eid2) can1 message slot 0 extended id2 (c1msl0eid2) can1 message slot 1 extended id2 (c1msl1eid2) can1 message slot 2 extended id2 (c1msl2eid2) can1 message slot 3 extended id2 (c1msl3eid2) can1 message slot 4 extended id2 (c1msl4eid2) can1 message slot 5 extended id2 (c1msl5eid2) can1 message slot 6 extended id2 (c1msl6eid2) can1 message slot 7 extended id2 (c1msl7eid2) can1 message slot 8 extended id2 (c1msl8eid2) can1 message slot 9 extended id2 (c1msl9eid2) can1 message slot 10 extended id2 (c1msl10eid2) can1 message slot 11 extended id2 (c1msl11eid2) can1 message slot 12 extended id2 (c1msl12eid2) can1 message slot 13 extended id2 (c1msl13eid2) can1 message slot 14 extended id2 (c1msl14eid2) can1 message slot 15 extended id2 (c1msl15eid2) 123456b7 b0 eid15 eid14 eid13 eid12 eid16 eid17 ?????? ? ? b bit name function r w 0, 1 no function assigned. fix to "0". 00 2?7 eid12?eid17 extended id12?extended id17 r w (extended id12?extended id17) these registers are the memory space for transmit and receive frames. note: ? if the message slot is set for the receive slot standard id format, an undefined value is written to the eid bits when storing received data.
13-63 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 message slot 0 data length register (c0msl0dlc) can0 message slot 1 data length register (c0msl1dlc) can0 message slot 2 data length register (c0msl2dlc) can0 message slot 3 data length register (c0msl3dlc) can0 message slot 4 data length register (c0msl4dlc) can0 message slot 5 data length register (c0msl5dlc) can0 message slot 6 data length register (c0msl6dlc) can0 message slot 7 data length register (c0msl7dlc) can0 message slot 8 data length register (c0msl8dlc) can0 message slot 9 data length register (c0msl9dlc) can0 message slot 10 data length register (c0msl10dlc) can0 message slot 11 data length register (c0msl11dlc) can0 message slot 12 data length register (c0msl12dlc) can0 message slot 13 data length register (c0msl13dlc) can0 message slot 14 data length register (c0msl14dlc) can0 message slot 15 data length register (c0msl15dlc) can1 message slot 0 data length register (c1msl0dlc) can1 message slot 1 data length register (c1msl1dlc) can1 message slot 2 data length register (c1msl2dlc) can1 message slot 3 data length register (c1msl3dlc) can1 message slot 4 data length register (c1msl4dlc) can1 message slot 5 data length register (c1msl5dlc) can1 message slot 6 data length register (c1msl6dlc) can1 message slot 7 data length register (c1msl7dlc) can1 message slot 8 data length register (c1msl8dlc) can1 message slot 9 data length register (c1msl9dlc) can1 message slot 10 data length register (c1msl10dlc) can1 message slot 11 data length register (c1msl11dlc) can1 message slot 12 data length register (c1msl12dlc) can1 message slot 13 data length register (c1msl13dlc) can1 message slot 14 data length register (c1msl14dlc) can1 message slot 15 data length register (c1msl15dlc) 9 1011121314b15 b8 dlc0 dlc1 dlc2 dlc3 ???? ? ? ? ? b bit name function r w 8?11 no function assigned. fix to "0". 00 12?15 dlc0?dlc3 0000: 0 bytes r w data length setting bit 0001: 1 bytes 0010: 2 bytes 0011: 3 bytes 0100: 4 bytes 0101: 5 bytes 0110: 6 bytes 0111: 7 bytes 1000: 8 bytes | | 1111: 8 bytes these registers are the memory space for transmit and receive frames. when sending, the register is used to set the transmit data length. when receiving, the register is used to store the receive frame dlc.
13 13-64 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 message slot 0 data 0 (c0msl0dt0) can0 message slot 1 data 0 (c0msl1dt0) can0 message slot 2 data 0 (c0msl2dt0) can0 message slot 3 data 0 (c0msl3dt0) can0 message slot 4 data 0 (c0msl4dt0) can0 message slot 5 data 0 (c0msl5dt0) can0 message slot 6 data 0 (c0msl6dt0) can0 message slot 7 data 0 (c0msl7dt0) can0 message slot 8 data 0 (c0msl8dt0) can0 message slot 9 data 0 (c0msl9dt0) can0 message slot 10 data 0 (c0msl10dt0) can0 message slot 11 data 0 (c0msl11dt0) can0 message slot 12 data 0 (c0msl12dt0) can0 message slot 13 data 0 (c0msl13dt0) can0 message slot 14 data 0 (c0msl14dt0) can0 message slot 15 data 0 (c0msl15dt0) can1 message slot 0 data 0 (c1msl0dt0) can1 message slot 1 data 0 (c1msl1dt0) can1 message slot 2 data 0 (c1msl2dt0) can1 message slot 3 data 0 (c1msl3dt0) can1 message slot 4 data 0 (c1msl4dt0) can1 message slot 5 data 0 (c1msl5dt0) can1 message slot 6 data 0 (c1msl6dt0) can1 message slot 7 data 0 (c1msl7dt0) can1 message slot 8 data 0 (c1msl8dt0) can1 message slot 9 data 0 (c1msl9dt0) can1 message slot 10 data 0 (c1msl10dt0) can1 message slot 11 data 0 (c1msl11dt0) can1 message slot 12 data 0 (c1msl12dt0) can1 message slot 13 data 0 (c1msl13dt0) can1 message slot 14 data 0 (c1msl14dt0) can1 message slot 15 data 0 (c1msl15dt0) 123456d7 d0 c0msl0dt0?c0msl15dt0, c1msl0dt0?c1msl15dt0 ???????? b bit name function r w 0?7 c0msl0dt0?c0msl15dt0, message slot data 0 r w c1msl0dt0?c1msl15dt0 these registers are the memory space for transmit and receive frames. notes: ? during a receive slot, an undefined value is written to the register if the data length of the data frame being stored (dlc value) = "0". ? the first byte of the can frame data field corresponds to message slot n data 0. data is transmitted or received beginning with the msb side of the register.
13-65 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 message slot 0 data 1 (c0msl0dt1) can0 message slot 1 data 1 (c0msl1dt1) can0 message slot 2 data 1 (c0msl2dt1) can0 message slot 3 data 1 (c0msl3dt1) can0 message slot 4 data 1 (c0msl4dt1) can0 message slot 5 data 1 (c0msl5dt1) can0 message slot 6 data 1 (c0msl6dt1) can0 message slot 7 data 1 (c0msl7dt1) can0 message slot 8 data 1 (c0msl8dt1) can0 message slot 9 data 1 (c0msl9dt1) can0 message slot 10 data 1 (c0msl10dt1) can0 message slot 11 data 1 (c0msl11dt1) can0 message slot 12 data 1 (c0msl12dt1) can0 message slot 13 data 1 (c0msl13dt1) can0 message slot 14 data 1 (c0msl14dt1) can0 message slot 15 data 1 (c0msl15dt1) can1 message slot 0 data 1 (c1msl0dt1) can1 message slot 1 data 1 (c1msl1dt1) can1 message slot 2 data 1 (c1msl2dt1) can1 message slot 3 data 1 (c1msl3dt1) can1 message slot 4 data 1 (c1msl4dt1) can1 message slot 5 data 1 (c1msl5dt1) can1 message slot 6 data 1 (c1msl6dt1) can1 message slot 7 data 1 (c1msl7dt1) can1 message slot 8 data 1 (c1msl8dt1) can1 message slot 9 data 1 (c1msl9dt1) can1 message slot 10 data 1 (c1msl10dt1) can1 message slot 11 data 1 (c1msl11dt1) can1 message slot 12 data 1 (c1msl12dt1) can1 message slot 13 data 1 (c1msl13dt1) can1 message slot 14 data 1 (c1msl14dt1) can1 message slot 15 data 1 (c1msl15dt1) 9 10 11 12 13 14 b15 b8 c0msl0dt1?c0msl15dt1, c1msl0dt1?c1msl15dt1 ???????? b bit name function r w 8?15 c0msl0dt1?c0msl15dt1, message slot data 1 r w c1msl0dt1?c1msl15dt1 these registers are the memory space for transmit and receive frames. note: ? during a receive slot, an undefined value is written to the register if the data length of the data frame being stored (dlc value) is equal to or less than 1.
13 13-66 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 message slot 0 data 2 (c0msl0dt2) can0 message slot 1 data 2 (c0msl1dt2) can0 message slot 2 data 2 (c0msl2dt2) can0 message slot 3 data 2 (c0msl3dt2) can0 message slot 4 data 2 (c0msl4dt2) can0 message slot 5 data 2 (c0msl5dt2) can0 message slot 6 data 2 (c0msl6dt2) can0 message slot 7 data 2 (c0msl7dt2) can0 message slot 8 data 2 (c0msl8dt2) can0 message slot 9 data 2 (c0msl9dt2) can0 message slot 10 data 2 (c0msl10dt2) can0 message slot 11 data 2 (c0msl11dt2) can0 message slot 12 data 2 (c0msl12dt2) can0 message slot 13 data 2 (c0msl13dt2) can0 message slot 14 data 2 (c0msl14dt2) can0 message slot 15 data 2 (c0msl15dt2) can1 message slot 0 data 2 (c1msl0dt2) can1 message slot 1 data 2 (c1msl1dt2) can1 message slot 2 data 2 (c1msl2dt2) can1 message slot 3 data 2 (c1msl3dt2) can1 message slot 4 data 2 (c1msl4dt2) can1 message slot 5 data 2 (c1msl5dt2) can1 message slot 6 data 2 (c1msl6dt2) can1 message slot 7 data 2 (c1msl7dt2) can1 message slot 8 data 2 (c1msl8dt2) can1 message slot 9 data 2 (c1msl9dt2) can1 message slot 10 data 2 (c1msl10dt2) can1 message slot 11 data 2 (c1msl11dt2) can1 message slot 12 data 2 (c1msl12dt2) can1 message slot 13 data 2 (c1msl13dt2) can1 message slot 14 data 2 (c1msl14dt2) can1 message slot 15 data 2 (c1msl15dt2) 123456b7 b0 c0msl0dt2?c0msl15dt2, c1msl0dt2?c1msl15dt2 ???????? b bit name function r w 0?7 c0msl0dt2?c0msl15dt2, message slot data 2 r w c1msl0dt2?c1msl15dt2 these registers are the memory space for transmit and receive frames. note: ? during a receive slot, an undefined value is written to the register if the data length of the data frame being stored (dlc value) is equal to or less than 2.
13-67 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 message slot 0 data 3 (c0msl0dt3) can0 message slot 1 data 3 (c0msl1dt3) can0 message slot 2 data 3 (c0msl2dt3) can0 message slot 3 data 3 (c0msl3dt3) can0 message slot 4 data 3 (c0msl4dt3) can0 message slot 5 data 3 (c0msl5dt3) can0 message slot 6 data 3 (c0msl6dt3) can0 message slot 7 data 3 (c0msl7dt3) can0 message slot 8 data 3 (c0msl8dt3) can0 message slot 9 data 3 (c0msl9dt3) can0 message slot 10 data 3 (c0msl10dt3) can0 message slot 11 data 3 (c0msl11dt3) can0 message slot 12 data 3 (c0msl12dt3) can0 message slot 13 data 3 (c0msl13dt3) can0 message slot 14 data 3 (c0msl14dt3) can0 message slot 15 data 3 (c0msl15dt3) can1 message slot 0 data 3 (c1msl0dt3) can1 message slot 1 data 3 (c1msl1dt3) can1 message slot 2 data 3 (c1msl2dt3) can1 message slot 3 data 3 (c1msl3dt3) can1 message slot 4 data 3 (c1msl4dt3) can1 message slot 5 data 3 (c1msl5dt3) can1 message slot 6 data 3 (c1msl6dt3) can1 message slot 7 data 3 (c1msl7dt3) can1 message slot 8 data 3 (c1msl8dt3) can1 message slot 9 data 3 (c1msl9dt3) can1 message slot 10 data 3 (c1msl10dt3) can1 message slot 11 data 3 (c1msl11dt3) can1 message slot 12 data 3 (c1msl12dt3) can1 message slot 13 data 3 (c1msl13dt3) can1 message slot 14 data 3 (c1msl14dt3) can1 message slot 15 data 3 (c1msl15dt3) 9 10 11 12 13 14 b15 b8 c0msl0dt3?c0msl15dt3, c1msl0dt3?c1msl15dt3 ???????? b bit name function r w 8?15 c0msl0dt3?c0msl15dt3, message slot data 3 r w c1msl0dt3?c1msl15dt3 these registers are the memory space for transmit and receive frames. note: ? during a receive slot, an undefined value is written to the register if the data length of the data frame being stored (dlc value) is equal to or less than 3.
13 13-68 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 message slot 0 data 4 (c0msl0dt4) can0 message slot 1 data 4 (c0msl1dt4) can0 message slot 2 data 4 (c0msl2dt4) can0 message slot 3 data 4 (c0msl3dt4) can0 message slot 4 data 4 (c0msl4dt4) can0 message slot 5 data 4 (c0msl5dt4) can0 message slot 6 data 4 (c0msl6dt4) can0 message slot 7 data 4 (c0msl7dt4) can0 message slot 8 data 4 (c0msl8dt4) can0 message slot 9 data 4 (c0msl9dt4) can0 message slot 10 data 4 (c0msl10dt4) can0 message slot 11 data 4 (c0msl11dt4) can0 message slot 12 data 4 (c0msl12dt4) can0 message slot 13 data 4 (c0msl13dt4) can0 message slot 14 data 4 (c0msl14dt4) can0 message slot 15 data 4 (c0msl15dt4) can1 message slot 0 data 4 (c1msl0dt4) can1 message slot 1 data 4 (c1msl1dt4) can1 message slot 2 data 4 (c1msl2dt4) can1 message slot 3 data 4 (c1msl3dt4) can1 message slot 4 data 4 (c1msl4dt4) can1 message slot 5 data 4 (c1msl5dt4) can1 message slot 6 data 4 (c1msl6dt4) can1 message slot 7 data 4 (c1msl7dt4) can1 message slot 8 data 4 (c1msl8dt4) can1 message slot 9 data 4 (c1msl9dt4) can1 message slot 10 data 4 (c1msl10dt4) can1 message slot 11 data 4 (c1msl11dt4) can1 message slot 12 data 4 (c1msl12dt4) can1 message slot 13 data 4 (c1msl13dt4) can1 message slot 14 data 4 (c1msl14dt4) can1 message slot 15 data 4 (c1msl15dt4) 123456b7 b0 c0msl0dt4?c0msl15dt4, c1msl0dt4?c1msl15dt4 ???????? b bit name function r w 0?7 c0msl0dt4?c0msl15dt4, message slot data 4 r w c1msl0dt4?c1msl15dt4 these registers are the memory space for transmit and receive frames. note: ? during a receive slot, an undefined value is written to the register if the data length of the data frame being stored (dlc value) is equal to or less than 4.
13-69 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 message slot 0 data 5 (c0msl0dt5) can0 message slot 1 data 5 (c0msl1dt5) can0 message slot 2 data 5 (c0msl2dt5) can0 message slot 3 data 5 (c0msl3dt5) can0 message slot 4 data 5 (c0msl4dt5) can0 message slot 5 data 5 (c0msl5dt5) can0 message slot 6 data 5 (c0msl6dt5) can0 message slot 7 data 5 (c0msl7dt5) can0 message slot 8 data 5 (c0msl8dt5) can0 message slot 9 data 5 (c0msl9dt5) can0 message slot 10 data 5 (c0msl10dt5) can0 message slot 11 data 5 (c0msl11dt5) can0 message slot 12 data 5 (c0msl12dt5) can0 message slot 13 data 5 (c0msl13dt5) can0 message slot 14 data 5 (c0msl14dt5) can0 message slot 15 data 5 (c0msl15dt5) can1 message slot 0 data 5 (c1msl0dt5) can1 message slot 1 data 5 (c1msl1dt5) can1 message slot 2 data 5 (c1msl2dt5) can1 message slot 3 data 5 (c1msl3dt5) can1 message slot 4 data 5 (c1msl4dt5) can1 message slot 5 data 5 (c1msl5dt5) can1 message slot 6 data 5 (c1msl6dt5) can1 message slot 7 data 5 (c1msl7dt5) can1 message slot 8 data 5 (c1msl8dt5) can1 message slot 9 data 5 (c1msl9dt5) can1 message slot 10 data 5 (c1msl10dt5) can1 message slot 11 data 5 (c1msl11dt5) can1 message slot 12 data 5 (c1msl12dt5) can1 message slot 13 data 5 (c1msl13dt5) can1 message slot 14 data 5 (c1msl14dt5) can1 message slot 15 data 5 (c1msl15dt5) 9 10 11 12 13 14 b15 b8 c0msl0dt5?c0msl15dt5, c1msl0dt5?c1msl15dt5 ???????? b bit name function r w 8?15 c0msl0dt5?c0msl15dt5, message slot data 5 r w c1msl0dt5?c1msl15dt5 these registers are the memory space for transmit and receive frames. note: ? during a receive slot, an undefined value is written to the register if the data length of the data frame being stored (dlc value) is equal to or less than 5.
13 13-70 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 message slot 0 data 6 (c0msl0dt6) can0 message slot 1 data 6 (c0msl1dt6) can0 message slot 2 data 6 (c0msl2dt6) can0 message slot 3 data 6 (c0msl3dt6) can0 message slot 4 data 6 (c0msl4dt6) can0 message slot 5 data 6 (c0msl5dt6) can0 message slot 6 data 6 (c0msl6dt6) can0 message slot 7 data 6 (c0msl7dt6) can0 message slot 8 data 6 (c0msl8dt6) can0 message slot 9 data 6 (c0msl9dt6) can0 message slot 10 data 6 (c0msl10dt6) can0 message slot 11 data 6 (c0msl11dt6) can0 message slot 12 data 6 (c0msl12dt6) can0 message slot 13 data 6 (c0msl13dt6) can0 message slot 14 data 6 (c0msl14dt6) can0 message slot 15 data 6 (c0msl15dt6) can1 message slot 0 data 6 (c1msl0dt6) can1 message slot 1 data 6 (c1msl1dt6) can1 message slot 2 data 6 (c1msl2dt6) can1 message slot 3 data 6 (c1msl3dt6) can1 message slot 4 data 6 (c1msl4dt6) can1 message slot 5 data 6 (c1msl5dt6) can1 message slot 6 data 6 (c1msl6dt6) can1 message slot 7 data 6 (c1msl7dt6) can1 message slot 8 data 6 (c1msl8dt6) can1 message slot 9 data 6 (c1msl9dt6) can1 message slot 10 data 6 (c1msl10dt6) can1 message slot 11 data 6 (c1msl11dt6) can1 message slot 12 data 6 (c1msl12dt6) can1 message slot 13 data 6 (c1msl13dt6) can1 message slot 14 data 6 (c1msl14dt6) can1 message slot 15 data 6 (c1msl15dt6) 123456b7 b0 c0msl0dt6?c0msl15dt6, c1msl0dt6?c1msl15dt6 ???????? b bit name function r w 0?7 c0msl0dt6?c0msl15dt6, message slot data 6 r w c1msl0dt6?c1msl15dt6 these registers are the memory space for transmit and receive frames. note: ? during a receive slot, an undefined value is written to the register if the data length of the data frame being stored (dlc value) is equal to or less than 6.
13-71 13 32176 group user?s manual (rev.1.01) 13.2 can module related registers can module can0 message slot 0 data 7 (c0msl0dt7) can0 message slot 1 data 7 (c0msl1dt7) can0 message slot 2 data 7 (c0msl2dt7) can0 message slot 3 data 7 (c0msl3dt7) can0 message slot 4 data 7 (c0msl4dt7) can0 message slot 5 data 7 (c0msl5dt7) can0 message slot 6 data 7 (c0msl6dt7) can0 message slot 7 data 7 (c0msl7dt7) can0 message slot 8 data 7 (c0msl8dt7) can0 message slot 9 data 7 (c0msl9dt7) can0 message slot 10 data 7 (c0msl10dt7) can0 message slot 11 data 7 (c0msl11dt7) can0 message slot 12 data 7 (c0msl12dt7) can0 message slot 13 data 7 (c0msl13dt7) can0 message slot 14 data 7 (c0msl14dt7) can0 message slot 15 data 7 (c0msl15dt7) can1 message slot 0 data 7 (c1msl0dt7) can1 message slot 1 data 7 (c1msl1dt7) can1 message slot 2 data 7 (c1msl2dt7) can1 message slot 3 data 7 (c1msl3dt7) can1 message slot 4 data 7 (c1msl4dt7) can1 message slot 5 data 7 (c1msl5dt7) can1 message slot 6 data 7 (c1msl6dt7) can1 message slot 7 data 7 (c1msl7dt7) can1 message slot 8 data 7 (c1msl8dt7) can1 message slot 9 data 7 (c1msl9dt7) can1 message slot 10 data 7 (c1msl10dt7) can1 message slot 11 data 7 (c1msl11dt7) can1 message slot 12 data 7 (c1msl12dt7) can1 message slot 13 data 7 (c1msl13dt7) can1 message slot 14 data 7 (c1msl14dt7) can1 message slot 15 data 7 (c1msl15dt7) 9 1011121314b15 b8 c0msl0dt7?c0msl15dt7, c1msl0dt7?c1msl15dt7 ???????? b bit name function r w 8?15 c0msl0dt7?c0msl15dt7, message slot data 7 r w c1msl0dt7?c1msl15dt7 these registers are the memory space for transmit and receive frames. note: ? during a receive slot, an undefined value is written to the register if the data length of the data frame being stored (dlc value) is equal to or less than 7.
13 13-72 32176 group user?s manual (rev.1.01) can module 13.2 can module related registers can0 message slot 0 timestamp (c0msl0tsp) can0 message slot 1 timestamp (c0msl1tsp) can0 message slot 2 timestamp (c0msl2tsp) can0 message slot 3 timestamp (c0msl3tsp) can0 message slot 4 timestamp (c0msl4tsp) can0 message slot 5 timestamp (c0msl5tsp) can0 message slot 6 timestamp (c0msl6tsp) can0 message slot 7 timestamp (c0msl7tsp) can0 message slot 8 timestamp (c0msl8tsp) can0 message slot 9 timestamp (c0msl9tsp) can0 message slot 10 timestamp (c0msl10tsp) can0 message slot 11 timestamp (c0msl11tsp) can0 message slot 12 timestamp (c0msl12tsp) can0 message slot 13 timestamp (c0msl13tsp) can0 message slot 14 timestamp (c0msl14tsp) can0 message slot 15 timestamp (c0msl15tsp) can1 message slot 0 timestamp (c1msl0tsp) can1 message slot 1 timestamp (c1msl1tsp) can1 message slot 2 timestamp (c1msl2tsp) can1 message slot 3 timestamp (c1msl3tsp) can1 message slot 4 timestamp (c1msl4tsp) can1 message slot 5 timestamp (c1msl5tsp) can1 message slot 6 timestamp (c1msl6tsp) can1 message slot 7 timestamp (c1msl7tsp) can1 message slot 8 timestamp (c1msl8tsp) can1 message slot 9 timestamp (c1msl9tsp) can1 message slot 10 timestamp (c1msl10tsp) can1 message slot 11 timestamp (c1msl11tsp) can1 message slot 12 timestamp (c1msl12tsp) can1 message slot 13 timestamp (c1msl13tsp) can1 message slot 14 timestamp (c1msl14tsp) can1 message slot 15 timestamp (c1msl15tsp) b0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 b15 c0msl0tsp?c0msl15tsp, c1msl0tsp?c1msl15tsp ???????????????? b bit name function r w 0?15 c0msl0tsp?c0msl15tsp, message slot timestamp r w c1msl0tsp?c1msl15tsp these registers are the memory space for transmit and receive frames. when transmission/reception has fin- ished, the can timestamp count register value is written to the register.
13-73 13 32176 group user?s manual (rev.1.01) can module figure 13.3.1 can protocol frames (1) 13.3 can protocol 13.3.1 can protocol frames there are four types of frames that are handled by can protocol: (1) data frame (2) remote frame (3) error frame (4) overload frame frames are separated from each other by an interframe space. 13.3 can protocol sof arbitration field control field data field crc field ack field eof 11 1 6 0?64 16 2 7 11 1 1 1 18 6 0?64 16 2 7 sof eof 11 1 6 16 2 7 11 1 1 1 18 6 16 2 7 data frame remote frame standard format standard format extended format note:  the number in each field denotes the number of bits. extended format 1 1 1 1 arbitration field control field crc field ack field
13 13-74 32176 group user?s manual (rev.1.01) can module figure 13.3.2 can protocol frames (2) 13.3 can protocol error flag error delimiter interframe space or overload flag 6?12 8 overload flag overload delimiter 6?12 8 interframe space or overload flag error frame overload frame interframe space intermission bus idle sof of the next frame for the case of an error active state 3 0? suspend transmission for the case of an error passive state 3 8 0? sof of the next frame bus idle intermission note:  the number in each field denotes the number of bits. 1 1 13.3.2 data formats during can transmission/reception figure 13.3.3 shows an example of the transmit/receive transfer data format that can be used in can. data is transmitted/received sequentially beginning with the msb side of the can message slot (c0mslnsid0- c0mslndt7 and c1mslnsid0-c1mslndt7). figure 13.3.3 example of can transmit/receive transfer data format sof sid0 sid1 sid2 sid3 msb arbitration field can frame arbitration field b0 b1 b2 b3 b4 msb data field data field
13-75 13 32176 group user?s manual (rev.1.01) can module 13.3.3 can controller error states the can controller assumes one of the following three error states depending on the transmit error and receive error counter values. (1) error active state ? this is a state where almost no errors have occurred. ? when an error is detected, an active error flag is transmitted. ? the can controller is in the state immediately after being initialized. (2) error passive state ? this is a state where many errors have occurred. ? when an error is detected, a passive error flag is transmitted. (3) bus off state ? this is a state where a very large number of errors have occurred. ? can communication with other nodes cannot be performed until the can module returns to an error active state. error status of the unit transmit error counter receive error counter error active state 0?127 and 0?127 error passive state 128?255 or 128 and over bus off state 256 and over ? transmit error counter > 255 transmit error counter 128 or receive error counter 128 transmit error counter < 128 and receive error counter < 128 11 consecutive recessive bits detected on can bus 128 times or reset by software error active state error passive state bus off state initial setting 13.3 can protocol figure 13.3.4 can controller error states
13 13-76 32176 group user?s manual (rev.1.01) can module 13.4 initializing the can module 13.4 initializing the can module 13.4.1 initializing the can module before performing communication, set up the can module as described below. (1) selecting pin functions the can transmit data output pin (ctx) and can receive data input pin (crx) are shared with input/output ports. be sure to select the functions of these pins. (see chapter 8, ?input/output ports and pin functions.? (2) setting the interrupt controller (icu) to use can module interrupts, set their interrupt priority levels. (3) setting can error, can single-shot and can slot interrupt request mask registers to use can bus error, can error passive, can error bus off, can single-shot or can slot interrupts, set each corresponding bit to "1" to enable the interrupt request. (4) setting dmac to use dma transfers by can, be sure to set the dmac. (5) setting can dma transfer request select register to use dma transfers by can, set the can dma transfer request select register to choose the cause of transfer request. (6) setting the bit timing and the number of times sampled using the can configuration register and can baud rate prescaler, set the bit timing and the number of times the can bus is sampled. 1) setting the bit timing determine the period tq that is the base of bit timing, the configuration of propagation segment, phase segment1 and phase segment2, and resynchronization jump width. the equation to calculate tq is given below. tq = (brp + 1) / (cpu clock) the baud rate is determined by the number of tq?s that comprise one bit. the equation to calculate the baud rate is given below. baud rate (bps) = 1 tq period note: ? the maximum baud rate for communication depends on the system configuration (e.g., bus length, clock error, can bus transceiver, sampling position and bit configuration). consider the system configuration when setting the baud rate and number of tq's.
13-77 13 32176 group user?s manual (rev.1.01) can module synchronization segment propagation segment phase segment1 phase segment2 (1) (2) (3) sampling point  this diagram shows the bit timing when one bit consists of 8 tq's.  if one-time sampling is selected, the value sampled at sampling point (1) is assumed to be the value of the bit.  if three-time sampling is selected, the value of the bit is determined by majority from can bus values sampled at sampling points (1), (2) and (3). 1tq 1 bit 13.4 initializing the can module figure 13.4.1 example of bit timing 2) setting the number of times sampled select the number of times the can bus is sampled from ?one time? and ?three times.? ? if one-time sampling is selected, the value sampled at only the end of phase segment1 is assumed to be the value of the bit. ? if three-time sampling is selected, the value of the bit is determined by majority from three sampled values, one sampled at the end of phase segment1 and the other sampled 1 tq before and 2 tq?s before that. (7) setting the id mask registers set the values of id mask registers (global mask register, local mask register a and local mask register b) that are used in acceptance filtering of received messages. (8) settings for use in basiccan mode ? set the can extended id register ide14 and ide15 bits. (we recommend setting the same value in these bits.) ? set ids in message slots 14 and 15. ? set the message control registers 14 and 15 for data frame reception (h?40). (9) settings for use in single-shot mode using the can mode register (cannmode) and can control register (canncnt), select can module operation mode (basiccan, loopback mode) and the clock source for the timestamp counter. (10) setting can module operation mode in the can single-shot mode control register, set the slot that is to be operated in single-shot mode. (11) releasing can module from reset when settings (1) through (10) above are finished, clear the can control register (canncnt)?s forcible reset (frst) and reset (rst) bits to "0". then, after detecting 11 consecutive recessive bits on the can bus, the can module becomes ready to communicate.
13 13-78 32176 group user?s manual (rev.1.01) can module initialize can module set the input/output port operation mode register set the interrupt controller set can related interrupt request mask registers set can configuration register set the id mask register set can operation mode negate can reset can module initialization completed set interrupt priority  set the bit timing (baud rate)  set the number of times sampled set the id mask bit set basiccan mode  set the can extended id register  set ids in message slots 14 and 15  set the message slot control register release can module from reset set can error interrupt request mask register  enable/disable can bus error interrupt request  enable/disable can error passive interrupt request  enable/disable can bus off interrupt request set can slot interrupt request mask register  enable/disable the interrupt request to be generated when transmission or reception in the relevant slot has finished set can single-shot interrupt request mask regiter  enable/disable the interrupt request to be generated when single-shot transission in the relevant slot has failed. set loopback mode  clear can control register (canncnt)'s frst and rst bits set dmac set can dma transfer request select register set dmac select dma transfer request source figure 13.4.2 initializing can module 13.4 initializing the can module
13-79 13 32176 group user?s manual (rev.1.01) can module 13.5 transmitting data frames 13.5 transmitting data frames 13.5.1 data frame transmit procedure the following describes the procedure for transmitting data frames. (1) initializing can message slot control register initialize the can message slot control register for the slot to be transmitted by writing h?00 to the register. (2) confirming that transmission is idle read the can message slot control register that has been initialized and check the trstat (transmit/ receive status) bit to see that transmission/reception has stopped and remains idle. if this bit = "1", it means that the can module is accessing the message slot. therefore, wait until the bit is cleared to "0". (3) setting transmit data set the transmit id and transmit data in the message slot. (4) setting the extended id register set the corresponding bit in the extended id register to "0" if the data is to be transmitted as a standard frame, or "1" if the data is to be transmitted as an extended frame. (5) setting can message slot control register write h?80 (note 1) to the can message slot control register to set the tr (transmit request) bit to "1". note 1: always be sure to write h?80 when transmitting data frames.
13 13-80 32176 group user?s manual (rev.1.01) can module 13.5 transmitting data frames data frame transmit procedure initialize can message slot control register set id and data in the message slot set the extended id register set can message slot control register end of setting write h'00 standard id or extended id write h'80 (transmit request) read can message slot control register trstat bit = 0 yes no confirm that transmission is idle figure 13.5.1 data frame transmit procedure 13.5.2 data frame transmit operation the following describes data frame transmit operation. the operations described below are automatically per- formed in hardware. (1) selecting a transmit frame the can module checks slots which have transmit requests (including remote frame transmit slots) every intermission to determine the frame to transmit. if two or more transmit slots exist, frames are transmitted in order of slot numbers beginning with the smallest. (2) transmitting a data frame after determining the transmit slot, the can module sets the corresponding can message slot control register?s trstat (transmit/receive status) bit to "1" and starts transmitting. (3) if lost in can bus arbitration or a can bus error occurs if the can module lost in can bus arbitration or a can bus error occurs in the middle of transmission, the can module clears the can message slot control register?s trstat (transmit/receive status) bit to "0". if the can module requested a transmit abort, the transmit abort is accepted and the message slot is en- abled for write.
13-81 13 32176 group user?s manual (rev.1.01) can module 13.5 transmitting data frames (4) completion of data frame transmission when data frame transmission has finished, the can message slot control register?s trfin (transmit/ receive finished) bit and the can slot interrupt request status register are set to "1". also, a timestamp count value at which transmission has finished is written to the can message slot timestamp (c0mslntsp, c1mslntsp), and the transmit operation is thereby completed. if the can slot interrupt request has been enabled, an interrupt request is generated at completion of trans- mit operation. the slot which has had transmission completed goes to an inactive state and remains inactive (neither transmit nor receive) until it is newly set in software. b'1000 0010 b'0000 0001 (note 1) b'1000 0001 b'0000 0000 (note 1) b'1000 0000 write h'80 transmission aborted transmit request accepted note 1: when in this state, data can be written to the message slot. transmission aborted transm it request accepted transm ission ab orted transmission completed transm ission aborted transm i ss ion completed wait for transmission b'0000 0010 lost in can bus arbitration or a can bus error occurs lost in can bus arbitration or a can bus error occurs figure 13.5.2 operation of can message slot control register during data frame transmission 13.5.3 transmit abort function the transmit abort function is used to cancel a transmit request that has once been set. this is accomplished by writing h?0f to the can message slot control register for the slot to be canceled. when transmit abort is accepted, the can module clears the can message slot control register?s trstat (transmit/receive sta- tus) bit to "0", allowing for data to be written to the message slot. the following shows the conditions under which transmit abort is accepted. [conditions] ? when the target message is waiting for transmission ? when a can bus error occurs during transmission ? when lost in can bus arbitration 1 2 3 4 5 6 b7(b15) (b8) b0 rm rr tr rl ra ml trstat trfin 00000000 bit arrangement in can message slot control register
13 13-82 32176 group user?s manual (rev.1.01) can module 13.6 receiving data frames 13.6 receiving data frames 13.6.1 data frame receive procedure the following describes the procedure for receiving data frames. (1) initializing can message slot control register initialize the can message slot control register for the slot to be received by writing h?00 to the register. (2) confirming that reception is idle read the can message slot control register that has been initialized and check the trstat (transmit/ receive status) bit to see that reception has stopped and remains idle. if this bit = "1", it means that the can module is accessing the message slot. therefore, wait until the bit is cleared to "0". (3) setting the receive id set the desired receive id in the message slot. (4) setting the extended id register set the corresponding bit in the extended id register to "0" if a standard frame is to be received, or "1" if an extended frame is to be received. (5) setting can message slot control register write h?40 to the can message slot control register to set the rr (receive request) bit to "1".
13-83 13 32176 group user?s manual (rev.1.01) can module 13.6 receiving data frames data frame receive procedure initialize can message slot control register set id in the message slot set the extended id register set can message slot control register end of setting write h'00 standard id or extended id write h'40 (receive request) read can message slot control register trstat bit = 0 yes no confirm that reception is idle figure 13.6.1 data frame receive procedure 13.6.2 data frame receive operation the following describes data frame receive operation. the operations described below are automatically per- formed in hardware. (1) acceptance filtering when the can module finished receiving data, it starts searching for the slot that satisfies the conditions for receiving the received message, sequentially from slot 0 (up to slot 15). the following shows receive condi- tions for the slots that have been set for data frame reception. [conditions] ? the received frame is a data frame. ? the receive id and the slot id are identical, assuming the id mask register bits set to "0" are ?don?t care.? ? the standard and extended frame types are the same. note: ? in basiccan mode, slots 14 and 15 while being set for data frame reception can also receive remote frames.
13 13-84 32176 group user?s manual (rev.1.01) can module b'0100 0011 b'0000 0001 b'0100 0001 b'0000 0000 b'0100 0000 clear the receive request set a receive request store the received data clear the receive request store the receive d data clear the receive request finished storing the received data finished st oring the receive d data clear the receive request b'0000 0011 b'0100 0111 store the received data b'0100 0101 finished storing the received data b'0000 0111 b'0000 0101 store the received data wait for the received data wait for the received data finished storing the received data cpu read cpu read clear the receive request clear the receive request clear the receive request finished storing the received data store the receive d data clear the receive request finished storing the receive d data clear the receive request figure 13.6.2 operation of can message slot control register during data frame reception 13.6 receiving data frames (2) when the receive conditions are met when the receive conditions in (1) above are met, the can module sets the can message slot control register?s trstat (transmit/receive status) bit and trfin (transmit/receive finished) bit to "1" while at the same time writing the received data to the message slot. if the trfin (transmit/receive finished) bit is already set to "1" at this time, the can module also sets the ml (message lost) bit to "1", indicating that the message slot has been overwritten. the message slot has both of its id and dlc fields entirely overwritten and has an undefined value written in its unused area (e.g., extended id field during standard frame recep- tion and an unused data field). furthermore, a timestamp count value at which the message was received is written to the can message slot timestamp (c0mslntsp, c1mslntsp) along with the received data. when the can module finished writing to the message slot, it sets the can slot interrupt request status bit to "1". if the interrupt request for the slot has been enabled, the can module generates an interrupt request and enters a wait state for the next reception. (3) when the receive conditions are not met the received frame is discarded, and the can module goes to the next transmit/receive operation without writing to the message slot. 1 2 3 4 5 6 b7(b15) (b8) b0 rm rr tr rl ra ml trstat trfin 00000000 bit arrangement in can message slot control register
13-85 13 32176 group user?s manual (rev.1.01) can module 13.6 receiving data frames 13.6.3 reading out received data frames the following shows the procedure for reading out received data frames from the slot. (1) clearing trfin (transmit/receive finished) bit write h?4e, h?40 or h?00 to the can message slot control register (c0mslncnt, c1mslncnt) to clear the trfin bit to "0". after this write, the slot operates as follows: values written to slot operation after write c0mslncnt, c1mslncnt h?4e operates as a data frame receive slot. whether overwritten can be verified by ml bit. h?40 operates as a data frame receive slot. whether overwritten cannot be verified by ml bit. h?00 the slot stops transmit/receive operation. notes: ? if message-lost check by the ml bit is needed, write h?4e to clear the trfin bit. ? if the trfin bit was cleared by writing h?4e, h?40 or h?00, it is possible that new data will be stored in the slot while still reading out a message from it. (2) reading out from the message slot read out a message from the message slot. (3) checking trfin (transmit/receive finished) bit read the can message slot control register to check the trfin (transmit/receive finished) bit. 1) if trfin (transmit/receive finished) bit = "1" it means that new data was stored in the slot while still reading out a message from it in (2) above. in this case, the data read out in (2) may contain an undefined value. therefore, reexecute the above procedure beginning with clearing of the trfin (transmit/receive finished) bit in (1). 2) if trfin (transmit/receive finished) bit = "0" it means that the can module finished reading out from the slot normally.
13 13-86 32176 group user?s manual (rev.1.01) can module 13.6 receiving data frames reading out received data clear trfin bit to 0 read out from the message slot finished reading out received data read can message slot control register trfin bit = 0 yes no write h'4e, h'40 or h'00 figure 13.6.3 procedure for reading out received data
13-87 13 32176 group user?s manual (rev.1.01) can module 13.7 transmitting remote frames 13.7.1 remote frame transmit procedure the following describes the procedure for transmitting remote frames. (1) initializing can message slot control register initialize the can message slot control register for the slot to be transmitted by writing h?00 to the register. (2) confirming that transmission is idle read the can message slot control register that has been initialized and check the trstat (transmit/ receive status) bit to see that transmission/reception has stopped and remains idle. if this bit = "1", it means that the can module is accessing the message slot. therefore, wait until the bit is cleared to "0". (3) setting transmit id set the id to be transmitted in the message slot. (4) setting the extended id register set the corresponding bit in the extended id register to "0" if the data is to be transmitted as a standard frame, or "1" if the data is to be transmitted as an extended frame. (5) setting can message slot control register write h?a0 to the can message slot control register to set the tr (transmit request) bit and rm (remote) bit to "1". 13.7 transmitting remote frames
13 13-88 32176 group user?s manual (rev.1.01) can module 13.7 transmitting remote frames remote frame transmit procedure initialize can message slot control register set id in the message slot set the extended id register set can message slot control register end of setting write h'00 standard id or extended id write h'a0 (transmit request, remote) read can message slot control register trstat bit = 0 yes no confirm that transmission is idle figure 13.7.1 remote frame transmit procedure 13.7.2 remote frame transmit operation the following describes remote frame transmit operation. the operations described below are automatically performed in hardware. (1) setting ra (remote active) bit the ra (remote active) bit is set to "1" at the same time h?a0 (transmit request, remote) is written to the can message slot control register, indicating that the corresponding slot is to handle remote frames. (2) selecting a transmit frame the can module checks slots which have transmit requests (including data frame transmit slots) every intermission to determine the frame to transmit. if two or more transmit slots exist, frames are transmitted in order of slot numbers beginning with the smallest. (3) transmitting a remote frame after determining the transmit slot, the can module sets the corresponding can message slot control register?s trstat (transmit/receive status) bit to "1" and starts transmitting.
13-89 13 32176 group user?s manual (rev.1.01) can module 13.7 transmitting remote frames (4) if lost in can bus arbitration or a can bus error occurs if the can module lost in can bus arbitration or a can bus error occurs in the middle of transmission, the can module clears the can message slot control register?s trstat (transmit/receive status) bit to "0". if the can module requested a transmit abort, the transmit abort is accepted and the message slot is en- abled for write. (5) completion of remote frame transmission when remote frame transmission finishes, the timestamp count value at which transmission finished is written to the can message slot timestamp (c0mslntsp, c1mslntsp) and the can message slot con- trol register?s ra (remote active) bit is cleared to "0". in addition, the can slot interrupt request status bit is set to "1" by completion of transmission, but the can message slot control register?s trfin (transmit/ receive finished) bit is not set to "1". if the can slot interrupt request has been enabled, an interrupt request is generated when transmission has finished. (6) receiving a data frame when remote frame transmission finishes, the slot automatically starts functioning as a data frame receive slot. (7) acceptance filtering when the can module finished receiving data, it starts searching for the slot that satisfies the conditions for receiving the received message, sequentially from slot 0 (up to slot 15). the following shows receive condi- tions for the slots that have been set for data frame reception. [conditions] ? the received frame is a data frame. ? the receive id and the slot id are identical, assuming the id mask register bits set to "0" are ?don?t care.? ? the standard and extended frame types are the same. note: ? in basiccan mode, slots 14 and 15 cannot be used as a transmit slot. (8) when the receive conditions are met when the receive conditions in (7) above are met, the can module sets the can message slot control register?s trstat (transmit/receive status) bit and trfin (transmit/receive finished) bit to "1" while at the same time writing the received data to the message slot. if the trfin (transmit/receive finished) bit is already set to "1" at this time, the can module also sets the ml (message lost) bit to "1", indicating that the message slot has been overwritten. the message slot has both of its id and dlc fields entirely overwritten and has an undefined value written in its unused area (e.g., extended id field during standard frame recep- tion and an unused data field). furthermore, a timestamp count value at which the message was received is written to the can message slot timestamp (c0mslntsp, c1mslntsp) along with the received data. when the can module finished writing to the message slot, it sets the can slot interrupt request status bit to "1". if the interrupt request for the slot has been enabled, the can module generates an interrupt request and enters a wait state for the next reception. note: ? if the can module receives a corresponding data frame before sending a remote frame, it stores the received data frame in the slot and does not transmit the remote frame. (9) when the receive conditions are not met the received frame is discarded, and the can module goes to the next transmit/receive operation without writing to the message slot.
13 13-90 32176 group user?s manual (rev.1.01) can module 13.7 transmitting remote frames b'0000 0000 b'0000 0000 store the received data lost in can bus arbitration or a can bus error occurr ed clear the transmit reque st b'0000 1010 b'1010 0011 store the received data clear the transmit request b'0000 0011 b'0000 0001 finished sending a remote frame cpu read b'1010 0101 b'1010 1000 b'1010 1010 finished storin g the received data clear t he re ceive reque st store the received data clear the receive request b'1010 0001 b'1010 0111 b'0000 0111 b'0000 0101 finished storing the received data finished sending a remote frame b'1010 0000 wait for received data b'1010 1011 b'0000 1011 clear the transmit request b'0000 0001 finished storing the received data b'0000 1000 can bus error occurred finished storing the received data store the received data store the received data wait for received data finished storing the received data store the received data clear the receive request finished st oring the received d ata clear t he receive req uest finished storing the received data figure 13.7.2 operation of the can message slot control register during remote frame transmission 13.7.3 reading out received data frames when set for remote frame transmission the following shows the procedure for reading out the data frames that have been received in the slot when it is set for remote frame transmission. (1) clearing trfin (transmit/receive finished) bit write h?ae or h?00 to the can message slot control register (c0mslncnt, c1mslncnt) to clear the trfin bit to "0". after this write, the slot operates as follows: values written to slot operation after write c0mslncnt, c1mslncnt h?ae operates as a data frame receive slot. whether overwritten can be verified by ml bit. h?00 the slot stops transmit/receive operation. notes: ? if message-lost check by the ml bit is needed, write h?ae to clear the trfin bit. ? if the trfin bit was cleared by writing h?ae or h?00, it is possible that new data will be stored in the slot while still reading out a message from it. ? the received data frame cannot be read out by writing h?a0 to the register. if the trfin bit is cleared by writing 1 2 3 4 5 6 b7(b15) (b8) b0 rm rr tr rl ra ml trstat trfin 00000000 bit arrangement in can message slot control register
13-91 13 32176 group user?s manual (rev.1.01) can module reading out received data clear trfin bit to 0 read out from the message slot finished reading out received data read can message slot control register trfin bit = 0 yes no write h'ae or h'00 figure 13.7.3 procedure for reading out received data when set for remote frame transmission 13.7 transmitting remote frames (2) reading out from the message slot read out a message from the message slot. (3) checking trfin (transmit/receive finished) bit read the can message slot control register to check the trfin (transmit/receive finished) bit. 1) if trfin (transmit/receive finished) bit = "1" it means that new data was stored in the slot while still reading out a message from it in (2) above. in this case, the data read out in (2) may contain an undefined value. therefore, reexecute the above procedure beginning with clearing of the trfin (transmit/receive finished) bit in (1). 2) if trfin (transmit/receive finished) bit = "0" it means that the can module finished reading out from the slot normally.
13 13-92 32176 group user?s manual (rev.1.01) can module 13.8 receiving remote frames 13.8 receiving remote frames 13.8.1 remote frame receive procedure the following describes the procedure for receiving remote frames. (1) initializing can message slot control register initialize the can message slot control register for the slot to be received by writing h?00 to the register. (2) confirming that reception is idle read the can message slot control register that has been initialized and check the trstat (transmit/ receive status) bit to see that reception has stopped and remains idle. if this bit = "1", it means that the can module is accessing the message slot. therefore, wait until the bit is cleared to "0". (3) setting the receive id set the desired receive id in the message slot. (4) setting the extended id register set the corresponding bit in the extended id register to "0" if a standard frame is to be received, or "1" if an extended frame is to be received. (5) setting can message slot control register 1) when automatic response (data frame transmission) for remote frame reception is desired write h?60 to the can message slot control register to set the rr (receive request) bit and rm (remote) bit to "1". 2) when automatic response (data frame transmission) for remote frame reception is to be disabled write h?70 to the can message slot control register to set the rr (receive request) bit, rm (remote) bit and rl (automatic response enable) bit to "1". note: ? during basiccan mode, slots 14 and 15, although capable of receiving remote frames, cannot automatically respond to remote frame reception.
13-93 13 32176 group user?s manual (rev.1.01) can module figure 13.8.1 remote frame receive procedure 13.8.2 remote frame receive operation the following describes remote frame receive operation. the operations described below are automatically performed in hardware. (1) setting ra (remote active) bit the ra (remote active) bit indicating that the corresponding slot is to handle remote frames is set to "1" at the same time h?60 (receive request, remote, automatic response enable) or h?70 (receive request, remote, automatic response disable) is written to the can message slot control register. (2) acceptance filtering when the can module finished receiving data, it starts searching for the slot that satisfies the conditions for receiving the received message, sequentially from slot 0 (up to slot 15). the following shows receive condi- tions for the slots that have been set for data frame reception. [conditions] ? the received frame is a remote frame. ? the receive id and the slot id are identical, assuming the id mask register bits set to "0" are ?don?t care.? ? the standard and extended frame types are the same. 13.8 receiving remote frames remote frame receive procedure initialize can message slot control register set id in the message slot set the extended id register set can message slot control register end of setting write h'00 standard id or extended id write h'60 (receive request, remote and automatic response enable) write h'70 (receive request, remote and automatic response disable) read can message slot control register trstat bit = 0 yes no confirm that reception is idle
13 13-94 32176 group user?s manual (rev.1.01) can module 13.8 receiving remote frames (3) when the receive conditions are met when the receive conditions in (2) above are met, the can module sets the can message slot control register?s trstat (transmit/receive status) bit and trfin (transmit/receive finished) bit to "1" while at the same time writing the received data to the message slot. in addition, a timestamp count value at which the message was received is written to the can message slot timestamp (c0mslntsp, c1mslntsp) along with the received data. when the can module finished writing to the message slot, it sets the can slot interrupt request status bit to "1". if the interrupt request for the slot has been enabled, the can module generates an interrupt request. notes: ? the id field and dlc value are written to the message slot. ? an undefined value is written to the extended id area when receiving standard format frames. ? the data field is not written to. ? the ra and trfin bits are cleared to "0" after writing the received remote frame data. (4) when the receive conditions are not met the received data is discarded, and the can module waits for the next receive frame. no data is written to the message slot. (5) operation after receiving a remote frame the operation performed after receiving a remote frame differs depending on how automatic response is set. 1) when automatic response is disabled the slot which has had reception completed goes to an inactive state and remains inactive (neither transmit nor receive) until it is newly set in software. 2) when automatic response is enabled after receiving a remote frame, the slot automatically changes to a data frame transmit slot and performs the transmit operation described below. in this case, the transmitted data conforms to the id and dlc of the received remote frame. ? selecting a transmit frame the can module checks slots which have transmit requests (including remote frame transmit slots) every intermission to determine the frame to transmit. if two or more transmit slots exist, frames are transmitted in order of slot numbers beginning with the smallest. ? transmitting a data frame after determining the transmit slot, the can module sets the corresponding can message slot control register?s trstat (transmit/receive status) bit to "1" and starts transmitting. ? if lost in can bus arbitration or a can bus error occurs if the can module lost in can bus arbitration or a can bus error occurs in the middle of transmission, the can module clears the can message slot control register?s trstat (transmit/receive status) bit to "0". if the can module requested a transmit abort, the transmit abort is accepted and the message slot is enabled for write. ? completion of data frame transmission when data frame transmission has finished, the can message slot control register?s trfin (transmit/receive finished) bit and the can slot interrupt request status register are set to "1". also, a timestamp count value at which transmission has finished is written to the can message slot timestamp (c0mslntsp, c1mslntsp), and the transmit operation is thereby completed. if the can slot interrupt request has been enabled, an interrupt request is generated at completion of transmit operation. the slot which has had transmission completed goes to an inactive state and remains inactive (neither transmit nor receive) until it is newly set in software.
13-95 13 32176 group user?s manual (rev.1.01) can module figure 13.8.2 operation of can message slot control register during remote frame reception b'0000 0000 b'0000 0000 clear the receive request b'0000 1010 b'0110 0010 store the received data clear the receive request b'0000 0010 b'0000 0001 finished storing the received data b'0110 1000 b'0110 1011 finished storing the received data clear the receive request b'0110 0001 b'0110 0000 b'0111 1000 b'0000 1010 b'0000 0000 wait for reception send a data frame clear the receive request finished sending a data frame finished sending a data frame send a data frame finished storing the received data store the received data b'0111 1011 store the received data b'0111 0000 finished storing the received data finished storing the receiv ed data clear the receiv e reque st store the received data clear the receive request write h'60 (automatic response enabled) write h'70 (automatic response disabled) 13.8 receiving remote frames 1 2 3 4 5 6 b7(b15) (b8) b0 rm rr tr rl ra ml trstat trfin 00000000 bit arrangement in can message slot control register
13 13-96 32176 group user?s manual (rev.1.01) can module 13.9 precautions about can module 13.9 precautions about can module ? note for cancelation of transmit and receive can remote frame when aborting remote frame transmission or canceling remote frame receiving, make sure that the ra (remote active) bit is cleared to "0" after writing "h'00" or "h'0f" to the can message slot control register. (1) when aborting remote frame transmission figure 13.9.1 opertion flow when aborting remote frame transmission (2) when canceling remote frame receiving figure 13.9.2 opertion flow when canceling remote frame receiving ra (remote active) bit = "0" complete transmission abort note 1: h'00 or h'0f can be used. no ye s start transmission abort write h'00 or h'0f to can message slot control register (note 1) read can message slot control register complete receiving abort no ye s start receiving abort write h'00 or h'0f to can message slot control register (note 1) read can message slot control register ra (remote active) bit = "0" note 1: h'00 or h'0f can be used.
chapter 14 real time debugger (rtd) 14.1 outline of the real-time debugger (rtd) 14.2 pin functions of rtd 14.3 rtd related register 14.4 functional description of rtd 14.5 typical connection with the host
14 14-2 real time debugger (rtd) 32176 group user?s manual (rev.1.01) 14.1 outline of the real-time debugger (rtd) the real-time debugger (rtd) is a serial i/o through which to read or write to any location in the entire area of the internal ram by using commands from outside the microcomputer. because data transfers between the rtd and internal ram are performed via a dedicated internal bus independently of the m32r, rtd operation can be controlled without the need to stop the m32r. table 14.1.1 outline of the real-time debugger (rtd) item description transfer method clock-synchronous serial i/o generation of transfer clock generated by external host ram access area entire area of the internal ram (controlled by a16?a29) transmit/receive data length 32 bits (fixed) bit transfer sequence lsb first maximum transfer rate 2 mbits/second input/output pins 4 pins (rtdtxd, rtdrxd, rtdack, rtdclk) number of commands following five functions ? monitor continuously ? output real-time ram content ? forcibly rewrite ram content (with verify) ? recover from runaway condition ? request rtd interrupt figure 14.1.1 block diagram of the real-time debugger (rtd) 14.1 outline of the real-time debugger (rtd) control circuit commands data data address address data rtd control circuit entire ram area cpu address data bus switching circuit rtdclkrtdclk rtdack rtdtxd rtdrxd
14 14-3 real time debugger (rtd) 32176 group user?s manual (rev.1.01) 14.2 pin functions of rtd pin functions of the rtd are shown below. table 14.2.1 pin functions of rtd pin name type function rtdtxd output rtd serial data output rtdrxd input rtd serial data input rtdack output output a low-level pulse synchronously with the beginning clock edge of the output data word. the width of this pulse indicates the type of instruction or data the rtd has received. 1 clock period: ver (continuous monitor) command 1 clock period: vei (rtd interrupt request) command 2 clock periods: rdr (real-time ram content output) command 3 clock periods: wrr (ram content forcible rewrite) command or the data to rewrite 4 clock periods or more: rcv (recover from runaway) command rtdclk input rtd transfer clock input 14.3 rtd related register the following shows an rtd related register map. rtd related register map address +0 address +1 address see b0 b7 b8 b15 page h'0080 077a (use inhibited area) rtd write function disable register 14-3 (wrrdis) 14.3.1 rtd write function disable register rtd write function disable register (wrrdis) 9 10 11 12 13 14 b15 b8 rtdwr dis 0 0 0 0 0 0 0 0 b bit name function r w 8?14 no function assigned. fix to "0" 00 15 rtdwrdis 0: write to ram by rtd enabled r w write to ram by rtd disable bit 1: write to ram by rtd disabled this register is used to select whether to enable or disable a write to ram by the rtd. setting the rtdwrdis bit disables a write to ram by the rtd, so that even when the rtd receives a command for write to ram, the command is ignored and no write operation to ram is executed. notes ? do not alter settings while using the rtd. 14.2 pin functions of rtd
14 14-4 real time debugger (rtd) 14.4 functional description of rtd 32176 group user?s manual (rev.1.01) 14.4 functional description of rtd 14.4.1 outline of rtd operation operation of the rtd is specified by a command entered from devices external to the chip. a command is indicated by bits 16?19 (note 1) of the rtd received data. table 14.4.1 rtd commands rtd received data command b19 b18 b17 b16 mnemonic rtd function 0000 ver (verify) continuous monitor 0100 0101 0 1 1 0 vei (verify interrupt request) rtd interrupt request 0010 rdr (read ram) real-time ram content output 0011wrr (write ram) ram content forcible rewrite (with verify) 1111 rcv (recover) recover from runaway condition (note 2), (note 3) 0001 system reserved (use inhibited) 14.4.2 operation of rdr (real-time ram content output) when the rdr (real-time ram content output) command is issued, the rtd is enabled to transfer the contents of the internal ram to external devices without causing the cpu?s internal bus to stop. because the rtd reads data from the internal ram while there are no transfers performed between the cpu and internal ram, no extra cpu load is incurred. only the 32-bit word-aligned addresses can be specified for read from the internal ram. (the two low-order address bits specified by a command are ignored.) data are read out and transferred from the internal ram in 32-bit units. figure 14.4.1 rdr command data format 31 x 0 0 10 19 18 17 16 0 15 0 14 13 12 1 a16 0 x 20 a17 a28 a29 command (rdr) specified address note:  x = don't care. (however, if issued immediately after the rcv command, bits 20-31 must all be set to 1.) rtdrxd (msb side) (lsb side)
14 14-5 real time debugger (rtd) 14.4 functional description of rtd 32176 group user?s manual (rev.1.01) 32 c l oc k periods rdr (a1) rdr (a2) rdr (a3) d (a1) d (a2) note:  (an) = specified address  d(an) = data at specified address (an) rtdclk rtdrxd rtdtxd rtdack 32 clock periods 32 clock periods 32 clock periods 2 clock periods figure 14.4.2 operation of rdr command figure 14.4.3 read data transfer format 31 b31 1 b0 0 b30 30 b1 read data rtdtxd note:  the read data is transferred lsb-first. (msb side) (lsb side)
14 14-6 real time debugger (rtd) 14.4 functional description of rtd 32176 group user?s manual (rev.1.01) 32 clock periods 32 clock periods wrr(a1) (a1) write data 3 clock periods rtdclk rtdrxd rtdtxd rtdack wrr(a2) (a2) write data d (a1) read value before writing d (a1) verify value after writing notes:  (an) = specified address  d ( an ) = data at s p ecified address ( an ) 32 clock periods 32 clock periods figure 14.4.5 operation of wrr command 14.4.3 operation of wrr (ram content forcible rewrite) when the wrr (ram content forcible rewrite) command is issued, the rtd forcibly rewrites the contents of the internal ram without causing the cpu?s internal bus to stop. because the rtd writes data to the internal ram while there are no transfers performed between the cpu and internal ram, no extra cpu load is incurred. only the 32-bit word-aligned addresses can be specified for read from the internal ram. (the two low-order address bits specified by a command are ignored.) data are written to the internal ram in 32-bit units. the external host should transmit the command and address in the first frame and then the write data in the second frame. the rtd writes to the internal ram in the third frame after receiving the write data. figure 14.4.4 wrr command data format the rtd reads out data from the specified address before writing to the internal ram and again reads out data from the same address immediately after writing to the internal ram (this helps to verify the data written to the internal ram). the read data is output at the timing shown below. 31 x 0 0 11 19 18 17 16 0 15 0 14 13 12 1 a16 0 x 20 a17 a28 a29 command (wrr) specified address notes:  x = don't care. (however, if issued immediately after the rcv command, bits 20-31 must all be set to 1.)  the specified address and write data are transferred lsb-first. 31 b31 1 b0 0 b30 30 b1 write data rtdrxd (msb side) (msb side) (lsb side) (lsb side) rtdrxd a) first frame b) second frame
14 14-7 real time debugger (rtd) 14.4 functional description of rtd 32176 group user?s manual (rev.1.01) 14.4.4 operation of ver (continuous monitor) when the ver (continuous monitor) command is issued, the rtd outputs the data from the address that has been accessed by an instruction (either read or write) immediately before receiving the ver command. figure 14.4.6 ver (continuous monitor) command data format 32 clock periods rdr(a1) ver 2 clock periods rtdclk rtdrxd rtdtxd rtdack d (a1) read value d (a1) latest read value (note 1) ver note 1: wrr command can also be used. notes:  (an) = specified address  d(an) = data at specified address (an) 32 clock periods 32 clock periods 32 clock periods figure 14.4.7 operation of ver (continuous monitor) command 14.4.5 operation of vei (interrupt request) when the vei (interrupt request) command is issued, an rtd interrupt request is generated. furthermore, the rtd outputs the data from the address that has been accessed by an instruction (either read or write) immediately before receiving the vei command. 31 x00 00 19 18 17 16 00 15 14 0 x 20 command (ver) notes:  x = don't care. (however, if issued immediately after the rcv command, bits 20-31 must all be set to 1.) rtdrxd x (msb side) (lsb side) figure 14.4.8 vei (interrupt request) command data format 31 x01 10 19 18 17 16 00 15 14 0 x 20 vei (interrupt request generation) command rtdrxd x note:  x = don't care. (however, if issued immediately after the vei command, bits 20-31 must all be set to 1.) (msb side) (lsb side)
14 14-8 real time debugger (rtd) 14.4 functional description of rtd 32176 group user?s manual (rev.1.01) figure 14.4.10 rcv command data format 31 1 1 1 11 19 18 17 16 1 15 0 1 20 command (rcv) rtdrxd 1 notes:  all of 32 data bits are 1's.  the rcv command must always be issued twice in succession. (msb side) (lsb side) 32 clock periods rdr(a1) vei 2 clock periods rtdclk rtdrxd rtdtxd rtdack rtd interrupt request rtd interrupt d (a1) read value note 1: wrr command can also be used. notes:  (an) = specified address  d(an) = data at specified address (an) 32 clock periods 32 clock periods 32 clock periods (note 1) d (a1) read value figure 14.4.9 operation of vei (interrupt request) command 14.4.6 operation of rcv (recover from runaway) if the rtd runs out of control, the rcv (recover from runaway) command may be issued to recover from the runaway condition without the need to reset the system. the rcv command must always be issued twice in succession. also, any command issued immediately following the rcv command must have all of its bits 20?31 set to "1".
14 14-9 real time debugger (rtd) 14.4 functional description of rtd 32176 group user?s manual (rev.1.01) rcv rcv command stored rtdclk rtdrxd rtdtxd rtdack rcv bits 20-31 d(a1) undefined data during runaway condition undefined value during runaway condition note:  the next command following the rcv command must have all of its bits 20-31 set to 1. next command following rcv command 2 clock periods 1    1 rdr(a1) 32 clock periods 32 clock periods 32 clock periods 32 clock periods 2 clock periods figure 14.4.11 operation of rcv command 14.4.7 method for setting a specified address when using rtd in the real-time debugger (rtd), the low-order 16-bit addresses of the internal ram can be specified. be- cause the internal ram is located in a 24-kb area ranging from h?0080 4000 to h?0080 9fff, the low-order 16-bit address of that area (h?4000 to h?ffff) can be set. however, to access any area other than ram is inhibited. note also that two least significant address bits, a31 and a30, area always 0 because data are read and written to and from the internal ram in a fixed length of 32 bits. sfr 16kb h'0080 0000 h'0080 4000 memory map h'0080 9fff x x a29 ? a16 only h'0080 4000 to h'0080 9fff can be specified    ram area 24 kb figure 14.4.12 setting addresses in the real-time debugger
14 14-10 real time debugger (rtd) 14.4 functional description of rtd 32176 group user?s manual (rev.1.01) 14.4.8 resetting rtd the rtd is reset by applying a system reset (i.e., reset# signal input). the status of the rtd related output pins after a system reset are shown below. table 14.4.2 rtd pin status after system reset pin name status rtdack high-level output rtdtxd high-level output the first command transfer to the rtd after being reset is initiated by transferring data to the rtdrxd pin synchronously with the falling edge of rtdclk. 32 clock periods don't care rdr(a1) rtdclk rtdrxd rtdtxd rtdack reset# system reset "h" rdr(a2) 0000 0000 0000 0000 d(a2) notes:  (an) = specified address  d(an) = data at specified address (an) "h" d(a1) 32 clock periods 32 clock periods 32 clock periods figure 14.4.13 command transfer to rtd after system reset
14 14-11 real time debugger (rtd) 32176 group user?s manual (rev.1.01) (8 bits) check that the rtdack signal is low. rtdclk rtdrxd rtdtxd rtdack transfer of one frame (32 bits) 1 2 transfer of the next frame (8 bits) (8 bits) figure 14.5.2 example of communication with the host (when using ver command) 14.5 typical connection with the host 14.5 typical connection with the host the host uses a serial synchronous interface to transfer data. the clock for synchronous communication should be generated by the host. an example for connecting the rtd and host is shown below. figure 14.5.1 connecting the rtd and host the rtd communication is performed in a fixed length of 32 bits per frame. because serial interfaces generally handle data in 8-bit units, data is transferred separately in four operations, 8 bits at a time. the rtdack signal is used to verify that communication is performed normally. the rtdack signal goes low after a command is sent, providing a means of verifying the communication status. when issuing the ver command, the rtdack signal is pulled low for only one clock period. therefore, after sending 32 bits in one frame via a serial interface, turn off rtdclk output and check that rtdack is low. that way, it is possible to know whether the rtd is communicating normally. if it is desirable to identify the type of transmitted command by the width of rtdack, use the microcomputer?s internal measurement timer (to count rtdclk pulses while rtdack is low), or design a dedicated circuit. rtdrxd rtdtxd rtdclk rtdack m32r/ecu host microprocessor rxd txd sclk port (note 1) note 1: this applies to the case where the rtdack level is checked between transfer frames.
14 14-12 real time debugger (rtd) 32176 group user?s manual (rev.1.01) 14.5 typical connection with the host this page is blank for reasons of layout.
chapter 15 external bus interface 15.1 external bus interface related signals 15.2 external bus interface related registers 15.3 read/write operations 15.4 bus arbitration 15.5 typical connection of external extension memory
15 15-2 external bus interface 32176 group user?s manual (rev.1.01) 15.1 external bus interface related signals the 32176 has the external bus interface related signals described below. these signals can be used in external extension and processor modes. the symbol ?#? suffixed to the signal names (or pin names) means that the signals (or pins) are active-low. (1) address the 32176 outputs a 19-bit address (a12?a30) for addressing any location in a 1-mbyte space. the least significant a31 is not output. (2) chip select (cs0#, cs1#) the cs0# and cs1# signals are output for external extension areas divided in 2-mbyte units. the cs0# signal points to a 2-mbyte area during processor mode or a 1-mbyte area during external extension mode. (for details, see chapter 3, ?address space.?) (3) read strobe (rd#) output during an external read cycle, this signal indicates the timing at which to read data from the bus. this signal is driven high when writing to the bus or accessing the internal area. (4) byte high write/byte high enable (bhw#/bhe#) the pin function changes depending on the bus mode control register (busmodc). when busmod = "0" and this signal is byte high write (bhw#), during external write access it indicates that the upper byte (db0?db7) of the data bus is the valid data transferred. during external read and when accessing the internal area it outputs a high. when busmod = "1" and this signal is byte high enable (bhe#), during external access (for read or write) it indicates that the upper byte (db0?db7) of the data bus is the valid data transferred. when accessing the internal area it outputs a high. (5) byte low write/byte low enable (blw#/ble#) the pin function changes depending on the bus mode control register (busmodc). when busmod = "0" and this signal is byte low write (blw#), during external write access it indicates that the lower byte (db8?db15) of the data bus is the valid data transferred. during external read and when accessing the internal area it outputs a high. when busmod = "1" and this signal is byte low enable (ble#), during external access (for read or write) it indicates that the lower byte (db8?db15) of the data bus is the valid data transferred. when accessing the internal area it outputs a high. (6) data bus (db0?db15) this is the 16-bit data bus used to access external devices. during external read access, data is latched from the bus synchronously with the rising edge of the read strobe. even during 8-bit read, the microcomputer always reads in 16 bits of data, with only the valid byte part of data transferred into the internal circuit. during external write access, data is output from the bus. during 8-bit write, the microcomputer outputs the valid byte part of data to be written as bhw#/blw#. when accessing the internal area, the bus functions as an input bus. 15.1 outline of the external bus interface
15 15-3 external bus interface 32176 group user?s manual (rev.1.01) (7) system clock/write (bclk/wr#) the pin function changes depending on the bus mode control register (busmodc). when busmod = "0" and this signal is system clock (bclk), it outputs the system clock necessary to synchronize operations in an external system. when the cpu clock = 40 mhz, a 20 mhz clock is output from bclk. when not using the bclk/wr function, this pin can be used as p70 by clearing the p7 operation mode register p70mod bit to "0". when busmod = "1" and this signal is write (wr#), during external write access it indicates the valid data transferred on the data bus. during external read cycle and when accessing the internal area it outputs a high. (8) wait (wait#) when the 32176 started an external bus cycle, it automatically inserts wait states while the wait# input signal is asserted. for details, see chapter 16, ?wait controller.? when not using the wait function, this pin can be used as p71 by clearing the p7 operation mode register p71mod bit to "0". for external access, one or more wait cycles always need to be inserted. therefore, the shortest possible access to an external device is equal to one wait cycle (2 bclk periods). (9) hold control (hreq#, hack#) the hold state refers to a state in which the microcomputer has stopped accessing the bus and the bus interface related pins are tristated (high impedance). while the microcomputer is in a hold state, any bus master external to the chip can use the system bus to transfer data. a low signal input on the hreq# pin places the microcomputer into a hold state. while the microcomputer remains in a hold state after accepting the hold request and during a transition to the hold state, the hack# pin outputs a low-level signal. to exit the hold state and return to normal operating state, release the hreq# signal back high. furthermore, when not using the hreq and hack functions, these pins can be used as p72 and p73 by clearing p72mod and p73mod in the p7 operation mode register to 0. the status of each pin during hold are shown below. table 15.1.1 pin state during hold period pin name pin state or operation a12?a30, db0?db15, cs0#, cs1#, rd#, bhw#, blw#, bhe#, ble#, wr# high impedance hack# output a low other pins (e.g., ports and timer output) normal operation 15.1 outline of the external bus interface
15 15-4 external bus interface 32176 group user?s manual (rev.1.01) 15.2 external bus interface related registers the following describes the external bus interface related registers. 15.2.1 port operation mode register ports p70?p73 can be switched for external access signal pins at any time irrespective of the cpu operation mode. p7 operation mode register (p7mod) b bit name function r w 8 p70mod 0: p70 r w port p70 operation mode bit 1: bclk/wr# 9 p71mod 0: p71 r w port p71 operation mode bit 1: wait# 10 p72mod 0: p72 r w port p72 operation mode bit 1: hreq# 11 p73mod 0: p73 r w port p73 operation mode bit 1: hack# 12 p74mod 0: p74 r w port p74 operation mode bit 1: rtdtxd/txd3 (note 1) 13 p75mod 0: p75 r w port p75 operation mode bit 1: rtdrxd/rxd3 (note 1) 14 p76mod 0: p76 r w port p76 operation mode bit 1: rtdack/ctx1 (note 1) 15 p77mod 0: p77 r w port p77 operation mode bit 1: rtdclk/crx1 (note 1) note 1: either of the functions is selected using the p7 peripheral function select register. 15.2 external bus interface related registers b8 9 1011121314b15 p70mod p71mod p72mod p73mod p74mod p75mod p76mod p77mod 00000000
15 15-5 external bus interface 32176 group user?s manual (rev.1.01) 15.2.2 bus mode control register bus mode control register (busmodc) b bit name function r w 8?14 no function assigned. fix to "0". 00 15 busmod 0: wr signal separate mode r w bus mode control bit 1: byte enable separate mode this register is used to facilitate memory connections during processor mode and external extension mode. when the bus mode control bit (busmod) = "0", the wr# signal is output separately for each byte area. signals rd#, bhw#, blw#, bclk# and wait# can be used. for memory connection in boot mode, the bus mode control register has no effect, and the microcomputer operates in the same way as when the bus mode control bit (busmod) is cleared to "0". when the bus mode control bit (busmod) = "1", the byte enable signal is output separately for each byte area. signals rd#, bhe#, ble#, wr# and wait# can be used. in a wait control circuit configuration, because bclk output is not available, timing must be controlled external to the chip. figure 15.2.1 pin functions when external bus modes are changed cs0#, cs1# db0?db15 wait# rd# bhw# blw# a12?a30 cs0#, cs1# db0?db15 wait# rd# wr# bhe# ble# a12?a30 bclk busmod bit = 0 busmod bit = 1 15.2 external bus interface related registers b8 9 1011121314b15 busmod 00000000
15 15-6 external bus interface 32176 group user?s manual (rev.1.01) 15.3 read/write operations (1) when the bus mode control register is set to "0" external read/write operations are performed using the address bus, data bus and the signals cs0#,cs1#, rd#, bhw#, blw#, wait# and bclk. in the external read cycle, the rd# signal is low while bhw# and blw# both are high, with data read in from only the necessary byte position. in the external write cycle, the bhw# or blw# signal output for the byte position to write is asserted low as data is written to the bus. when an external bus cycle starts, wait states are inserted as long as the wait# signal is low. unless necessary, the wait# signal must always be held high. one wait cycle always need to be inserted even for the shortest external access. (the shortest possible bus cycle is 2 bclk periods). figure 15.3.1 internal bus access during bus free state 15.3 read/write operations bus-free state internal bus access "h" bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" hi-z note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note:  hi-z denotes a high-impedance state. (don't care) bus mode control register (note 1) busmod bit = 0 (wr signal separated)
15 15-7 external bus interface 32176 group user?s manual (rev.1.01) 15.3 read/write operations figure 15.3.2 read/write timing (for shortest external access) read read (2 cycles) bclk a12 ? a30 cs0#, cs1# bhw#, blw# db0 ? db15 wait# rd# "h" note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note:  circles in the above diagram denote the sampling timing. internal 1 wait state (don't care) (don't care) write write (2 cycles) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" internal 1 wait state (don't care) (don't care) bus mode control register (note 1) busmod bit = 0 (wr signal separated) "h" "h"
15 15-8 external bus interface 32176 group user?s manual (rev.1.01) figure 15.3.3 read/write timing (for access with internal 2 and external 1 wait states) read write read (4 cycles) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note:  circles in the above diagram denote the sampling timing. "l" internal 2 wait states external 1 wait state (don't care) "h" (don't care) write (4 cycles) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" "l" (don't care) "h" (don't care) bus mode control register (note 1) busmod bit = 0 (wr signal separated) internal 2 wait states external 1 wait state 15.3 read/write operations
15 15-9 external bus interface 32176 group user?s manual (rev.1.01) (2) when the bus mode control register is set to "1" external read/write operations are performed using the address bus, data bus and the signals cs0#, cs1#, rd#, bhe#, ble#, wait# and wr#. in the external read cycle, the rd# signal is low and the bhe# or ble# signal output for the byte position from which to read is asserted low, with data read in from only the neces- sary byte position of the bus. in the external write cycle, the wr# signal goes low and the bhe# or ble# signal output for the byte position to write is asserted low, with data written to the necessary byte position. when an external bus cycle starts, wait states are inserted as long as the wait# signal is low. unless necessary, the wait# signal must always be held high. one wait cycle always need to be inserted even for the shortest external access. (the shortest possible bus cycle is 2 bclk periods). when not using the wait function, this pin can be used as p71 by clearing the p7 operation mode register p71mod bit to "0". figure 15.3.4 internal bus access during bus free state "h" wr# bus-free state internal bus access "h" bclk a12?a30 cs0#, cs1# bhe#, ble# db0?db15 wait# rd# "h" hi-z (don't care) note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." notes:  hi-z denotes a high-impedance state.  bclk is not output. bus mode control register (note 1) busmod bit = 1 (byte enable separated) 15.3 read/write operations
15 15-10 external bus interface 32176 group user?s manual (rev.1.01) figure 15.3.5 read/write timing (for shortest external access) read read (2 cycles) bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" "h" note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." notes:  circles in the above diagram denote the sampling timing.  bclk is not output. (don't care) bhe#, ble# internal 1 wait state write write (2 cycles) bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" (don't care) (don't care) bhe#, ble# internal 1 wait state bus mode control register (note 1) busmod bit = 1 (byte enable separated) (don't care) "h" 15.3 read/write operations
15 15-11 external bus interface 32176 group user?s manual (rev.1.01) figure 15.3.6 read/write timing (for access with internal 2 and external 1 wait states) read write read (4 cycles) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." notes:  circles in the above diagram denote the sampling timing.  bclk is not output. "h" internal 2 wait states external 1 wait state wr# "l" (don't care) write (4 cycles) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" "h" wr# "l" (don't care) (don't care) (don't care) bus mode control register (note 1) busmod bit = 1 (byte enable separated) internal 2 wait states external 1 wait state 15.3 read/write operations
15 15-12 external bus interface 32176 group user?s manual (rev.1.01) 15.4 bus arbitration 15.4 bus arbitration (1) when the bus mode control register is set to "0" when the input signal on the hreq# pin is pulled low and the hold request is accepted, the microcomputer goes to a hold state and outputs a low from the hack# pin. during hold state, all bus related pins are placed in the high-impedance state, allowing data to be transferred on the system bus. to exit the hold state and return to normal operating state, release the hreq# signal back high. figure 15.4.1 bus arbitration timing db0?db15 bclk bus cycle idle go to hold state hold state return next bus cycle note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." notes:  circles in the above diagram denote the sampling timing.  hi-z denotes a high-impedance state.  idle cycles are inserted only when a hold state is entered immediately following an external read access. hreq# hack# a12?a30 cs0#, cs1# rd# bhw#, blw# wait# hi-z (don't care) hi-z hi-z hi-z hi-z bus mode control register (note 1) busmod bit = 0 (byte enable separated)
15 15-13 external bus interface 32176 group user?s manual (rev.1.01) (2) when the bus mode control register is set to "1" when the input signal on the hreq# pin is pulled low and the hold request is accepted, the microcomputer goes to a hold state and outputs a low from the hack# pin. during hold state, all bus related pins are placed in the high-impedance state, allowing data to be transferred on the system bus. to exit the hold state and return to normal operating state, release the hreq# signal back high. figure 15.4.2 bus arbitration timing db0?db15 bclk note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." notes:  circles in the above diagram denote the sampling timing.  hi-z denotes a high-impedance state.  idle cycles are inserted only when a hold state is entered immediately following an external read access. hreq# hack# a12?a30 cs0#, cs1# rd# bhw#, blw# wait# hi-z (don't care) hi-z hi-z hi-z hi-z hi-z wr# bus mode control register (note 1) busmod bit = 1 (byte enable separated) bus cycle idle go to hold state hold state return next bus cycle 15.4 bus arbitration
15 15-14 external bus interface 32176 group user?s manual (rev.1.01) 15.5 typical connection of external extension memory 15.5 typical connection of external extension memory (1) when the bus mode control register is set to "0" a typical memory connection when using external extension memory is shown in figure 15.5.1. (external extension memory can only be used in external extension mode and processor mode.) figure 15.5.1 typical connection of external extension memory (when busmod bit = "0") note: ? the address and data are connected in such a way that pin 0 is the msb and pin 15 is the lsb. when connecting external extension memory, connections of the msb and lsb sides must be reversed. memory mapping internal flash memory (384kb) number of bus wait states can be set to 1-4. normally used as port. wait is used only when four or more wait states are needed. h'0000 0000 h'001f ffff h'0040 0000 h'0020 0000 h'0006 0000 not used h'0010 0000 (1mb) 2m-cs1 area sram flash memory a18 a0 d15 d0 rd# cs# max1mb a17 a0 d15 d0 rd#(d0-d15) cs# wr#(d0-d7) wr#(d8-d15) max512kb*2 (total1mb) m32176f3 a12 a30 d0 d15 rd# cs0# cs1# blw# bhw# wait# h'000f ffff ghost area h'0030 0000 external memory area (1mb) 1m-cs0 area external memory area
15 15-15 external bus interface 32176 group user?s manual (rev.1.01) 15.5 typical connection of external extension memory (2) when the bus mode control register is set to "1" a typical memory connection when using external extension memory is shown in figure 15.5.2. (external extension memory can only be used in external extension mode and processor mode.) figure 15.5.2 typical connection of external extension memory (when busmod bit = "1") note: ? the address and data are connected in such a way that pin 0 is the msb and pin 15 is the lsb. when connecting external extension memory, connections of the msb and lsb sides must be reversed. sram m32176f3 a12 a30 d0 d15 rd# cs0# cs1# ble# bhe# number of bus wait states can be set to 1-4. wait# normally used as port. wait is used only when four or more wait states are needed. flash memory a18 a0 d15 d0 rd# cs# max1mb a18 a0 d15 d0 rd#(d0-d15) cs# bhe#(d0-d7) ble#(d8-d15) max1mb wr# wr#(d0-d15) memory mapping internal flash memory (384kb) h'0000 0000 h'001f ffff h'0040 0000 h'0020 0000 h'0006 0000 not used h'0010 0000 external memory area (1mb) 2m-cs1 area h'000f ffff ghost area h'0030 0000 external memory area (1mb) 1m-cs0 area
15 15-16 external bus interface 32176 group user?s manual (rev.1.01) (3) when the bus mode control register is set to "1" using a combination of 8/16-bit data bus memories the diagram below shows a typical connection of external extension memory, with an 8-bit data bus memory located in the cs0 area, and a 16-bit data bus memory located in the cs1 area. (external extension memory can only be used in external extension mode and processor mode.) 15.5 typical connection of external extension memory memory mapping internal flash memory (384kb) external memory area (1mb) when cl = 50 pf, memory can be connected with only 2 ns of data delay. normally used as port. wait is used only when four or more wait states are needed. h'0000 0000 h'0040 0000 h'0020 0000 h'0006 0000 not used h'0010 0000 1m-cs0 area 2m-cs1 area sram 8-bit memory a18 a1 d7 d0 rd# cs# max1mb a18 a0 d15 d0 bhe# cs# wr#(d0-d15) rd#(d0-d15) max1mb m32176f3 a12 a30 d0 d15 rd# cs0# cs1# bhe# wr# wait# qs32x2245 d7 d8 a b oe ble# ble# a0 8-bit bus area note:  the qs32x2245 is a product made by the idt company. a b number of bus wait states can be set to 1-4. h'000f ffff external memory area (1mb) 16-bit bus area h'0030 0000 ghost area wr# figure 15.5.3 typical connection of external extension memory (when busmod bit = "1" using a combina- tion of 8/16-bit memories) note: ? the address and data are connected in such a way that pin 0 is the msb and pin 15 is the lsb. when connecting external extension memory, connections of the msb and lsb sides must be reversed.
chapter 16 wait controller 16.1 outline of the wait controller 16.2 wait controller related register 16.3 typical operation of the wait controller
16 16-2 wait controller 32176 group user?s manual (rev.1.01) 16.1 outline of the wait controller the wait controller controls the number of wait states inserted in bus cycles when accessing an external extension area. the wait controller is outlined in the table below. table 16.1.1 outline of the wait controller item description target space control is applied to the following address spaces depending on operation mode: single-chip mode: no target space (settings of the wait controller have no effect) external extension mode : cs0 area (1 mbyte), cs1 area (1 mbyte), processor mode: cs0 area (1 mbyte), cs1 area (1 mbyte) number of wait states 1?4 wait states set by software + any number of wait states set from the wait# pin that can be inserted (the shortest possible bus cycle during external access is equal to one wait cycle inserted.) during external extension and processor modes, two chip select signals (cs0#, cs1#) are output, each corre- sponding to one of the two external extension areas referred to as cs0 and cs1. 16.1 outline of the wait controller h'0000 0000 h'003f ffff cs0 area (1mb) h'001f ffff h'0020 0000 h'000f ffff h'0010 0000 h'002f ffff h'0030 0000 internal rom area external extension area external extension area non-cs0 area (internal rom access area) reserved area cs0 area (1mb) cs1 area (1mb) cs1 area (1mb) ghost of cs1 area (1mb) ghost of cs1 area (1mb) ghost of cs0 area (1mb) figure 16.1.1 cs0 and cs1 area address map when accessing the external extension area, the wait controller controls the number of wait states inserted in bus cycles based on the number of wait states set by software and those entered from the wait# pin. the number of wait states that can be controlled in software is 1 to 4. (the shortest possible bus cycle during external access is equal to one wait cycle inserted.) when the input signal on the wait# pin is sampled low in the last cycle of internal wait state, the wait state is extended as long as the wait# input signal is held low. then when the wait# input signal is released back high, the wait state is terminated and the next new bus cycle is entered into.
16 16-3 wait controller 32176 group user?s manual (rev.1.01) 16.1 outline of the wait controller table 16.1.2 number of wait states that can be set by the wait controller external extension area address number of wait states inserted cs0 area h?0010 0000 to h?001f ffff 1 to 4 wait states set by software (external extension mode) + any number of wait states entered from the wait# pin h?0000 0000 to h?001f ffff (however, software settings have priority.) (processor mode) cs1 area h?0020 0000 to h?002f ffff 1 to 4 wait states set by software (external extension and + any number of wait states entered from the wait# pin processor modes) (however, software settings have priority.) note 1: during processor mode, a ghost of the cs0 area (1 mbytes) will appear in the h?0010 0000?h?001f ffff area. note 2: a ghost of the cs1 area (1 mbytes) will appear in the h?0030 0000?h?003f ffff area.
16 16-4 wait controller 32176 group user?s manual (rev.1.01) 16.2 wait controller related register shown below is a wait controller related register map. wait controller related register map address +0 address +1 address see b0 b7 b8 b15 page h'0080 0180 wait cycles control register (use inhibited area) 16-4 (wtccr) 16.2.1 wait cycles control register wait cycles control register (wtccr) 123456b7 b0 cs0wtc cs1wtc 00 00 0 0 0 0 b bit name function r w 0, 1 no function assigned. fix to "0". 00 2, 3 cs0wtc 00: 4 wait states (upon exiting reset) r w cs0 wait cycles select bit 01: 3 wait states 10: 2 wait states 11: 1 wait state 4, 5 no function assigned. fix to "0". 00 6, 7 cs1wtc 00: 4 wait states (upon exiting reset) r w cs1 wait cycles select bit 01: 3 wait states 10: 2 wait states 11: 1 wait state 16.2 wait controller related register
16 16-5 wait controller 32176 group user?s manual (rev.1.01) figure 16.3.1 internal bus access during bus free state 16.3 typical operation of the wait controller the following shows a typical operation of the wait controller. the wait controller can control bus access in 2 to 5 cycles. if more access cycles than that are needed, use the wait function in combination with the wait controller. (1) when the bus mode control register is set to 0 external read/write operations are performed using the address bus, data bus and the signals cs0#, cs1#, rd#, bhw#, blw#, wait# and bclk. 16.3 typical operation of the wait controller "h" bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" hi-z (don't care) bus free state internal bus access note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note:  hi-z denotes a high-impedance state. bus mode control register (note 1) busmod bit = 0 (wr signal separated)
16 16-6 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.2 read/write timing (for access with internal 1 wait state) read bclk a12 ? a30 cs0#, cs1# bhw#, blw# db0 ? db15 wait# rd# "h" (don't care) (don't care) write bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" (don't care) (don't care) bus mode control register (note 1) busmod bit = 0 (wr signal separated) wait cycles control register (note 2) csnwtc bit = 11 (1 wait) "h" "h" read (2 cycles) internal 1 wait state write (2 cycles) internal 1 wait state note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." note:  circles in the above diagram indicate the sampling timing.
16 16-7 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.3 read/write timing (for access with internal 2 wait states) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" (don't care) "h" (don't care) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" (don't care) "h" (don't care) read write bus mode control register (note 1) busmod bit = 0 (wr signal separated) wait cycles control register (note 2) csnwtc bit = 10 (2 waits) read (3 cycles) internal 2 wait states write (3 cycles) internal 2 wait states note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." note:  circles in the above diagram indicate the sampling timing.
16 16-8 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.4 read/write timing (for access with internal 3 wait states) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" (don't care) "h" (don't care) bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" (don't care) "h" (don't care) read write bus mode control register (note 1) busmod bit = 0 (wr signal separated) wait cycles control register (note 2) csnwtc bit = 01 (3 waits) read (4 cycles) internal 3 wait states write (4 cycles) internal 3 wait states note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." note:  circles in the above diagram indicate the sampling timing.
16 16-9 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.5 read/write timing (for access with internal 4 wait states) read bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" (don't care) "h" (don't care) write bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" (don't care) "h" (don't care) bus mode control register (note 1) busmod bit = 0 (wr signal separated) wait cycles control register (note 2) csnwtc bit = 00 (4 waits) read (5 cycles) internal 4 wait states write (5 cycles) internal 4 wait states note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." note:  circles in the above diagram indicate the sampling timing.
16 16-10 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.6 read/write timing (for access with internal 4 and external 1 wait states) read bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" "l" (don't care) "h" (don't care) write bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" "l" (don't care) "h" (don't care) bus mode control register (note 1) busmod bit = 0 (wr signal separated) wait cycles control register (note 2) csnwtc bit = 00 (4 waits) read (6 cycles) internal 4 wait states write (6 cycles) internal 4 wait states note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." note:  circles in the above diagram indicate the sampling timing. external 1 wait state external 1 wait state
16 16-11 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.7 read/write timing (for access with internal 2 and external n wait states) read bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" "l" (don't care) "h" (don't care) write bclk a12?a30 cs0#, cs1# bhw#, blw# db0?db15 wait# rd# "h" "l" (don't care) "h" (don't care) "l" "l" "l" "l" bus mode control register (note 1) busmod bit = 0 (wr signal separated) wait cycles control register (note 2) csnwtc bit = 10 (2 waits) read (3+n cycles) internal 2 wait states write (3+n cycles) internal 2 wait states note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." note:  circles in the above diagram indicate the sampling timing. external n wait states external n wait states
16 16-12 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) (2) when the bus mode control register is set to 1 external read/write operations are performed using the address bus, data bus and the signals cs0#, cs1#, rd#, bhe#, ble#, wait# and wr#. figure 16.3.8 internal bus access during bus free state "h" wr# bus free state internal bus access "h" bclk a12?a30 cs0#, cs1# bhe#, ble# db0?db15 wait# rd# "h" hi-z (don't care) note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." notes:  hi-z denotes a high-impedance state.  bclk is not output. bus mode control register (note 1) busmod bit = 1 (byte enable separated)
16 16-13 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.9 read/write timing (for access with internal 1 wait state) read bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" "h" (don't care) bhe#, ble# write bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" (don't care) (don't care) bhe#, ble# bus mode control register (note 1) busmod bit = 1 (byte enable separated) wait cycles control register (note 2) csnwtc bit = 11 (1 wait) (don't care) "h" read (2 cycles) internal 1 wait state write (2 cycles) internal 1 wait state note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." notes:  circles in the above diagram indicate the sampling timing.  bclk is not output.
16 16-14 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.10 read/write timing (for access with internal 2 wait states) read bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" (don't care) bhe#, ble# (don't care) "h" write bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" (don't care) bhe#, ble# (don't care) "h" bus mode control register (note 1) busmod bit = 1 (byte enable separated) wait cycles control register (note 2) csnwtc bit = 10 (2 waits) read (3 cycles) internal 2 wait states write (3 cycles) internal 2 wait states note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." notes:  circles in the above diagram indicate the sampling timing.  bclk is not output.
16 16-15 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.11 read/write timing (for access with internal 3 wait states) read bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." notes:  circles in the above diagram indicate the sampling timing.  bclk is not output. (don't care) bhe#, ble# (don't care) "h" write bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" (don't care) bhe#, ble# (don't care) "h" bus mode control register (note 1) busmod bit = 1 (byte enable separated) wait cycles control register (note 2) csnwtc bit = 01 (3 waits) read (4 cycles) internal 3 wait states write (4 cycles) internal 3 wait states
16 16-16 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.12 read/write timing (for access with internal 4 wait states) read bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." notes:  circles in the above diagram indicate the sampling timing.  bclk is not output. (don't care) bhe#, ble# (don't care) "h" write bus mode control register (note 1) busmod bit = 1 (byte enable separated) wait cycles control register (note 2) csnwtc bit = 00 (4 waits) bclk a12?a30 cs0#, cs1# wr# db0?db15 wait# rd# "h" (don't care) bhe#, ble# (don't care) "h" read (5 cycles) internal 4 wait states write (5 cycles) internal 4 wait states
16 16-17 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.13 read/write timing (for access with internal 4 and external 1 wait states) read bclk a13?a30 cs0#, cs1# bhe#, ble# db0?db15 wait# rd# "h" note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." notes:  circles in the above diagram indicate the sampling timing.  bclk is not output. "l" (don't care) "h" (don't care) write bclk a12?a30 cs0#, cs1# bhe#, ble# db0?db15 wait# rd# "h" "l" (don't care) "h" (don't care) wr# wr# bus mode control register (note 1) busmod bit = 1 (byte enable separated) wait cycles control register (note 2) csnwtc bit = 00 (4 waits) read (6 cycles) internal 4 wait states write (6 cycles) internal 4 wait states external 1 wait state external 1 wait state
16 16-18 wait controller 16.3 typical operation of the wait controller 32176 group user?s manual (rev.1.01) figure 16.3.14 read/write timing (for access with internal 2 and external n wait states) read bclk a12?a30 cs0#, cs1# bhe#, ble# db0?db15 wait# rd# "h" note 1: for details about the bus mode control register, see section 15.2.2, "bus mode control register." note 2: for details about the wait cycles control register, see section 16.2.1, "wait cycles control register." notes:  circles in the above diagram indicate the sampling timing.  bclk is not output. "l" (don't care) "h" (don't care) write bclk a12?a30 cs0#, cs1# bhe#, ble# db0?db15 wait# rd# "h" "l" (don't care) "h" (don't care) "l" "l" "l" "l" wr# wr# bus mode control register (note 1) busmod bit = 1 (byte enable separated) wait cycles control register (note 2) csnwtc bit = 10 (2 waits) read (3+n cycles) internal 2 wait states write (3+n cycles) internal 2 wait states external n wait states external n wait states
chapter 17 ram backup mode 17.1 outline of ram backup mode 17.2 example of ram backup when power is off 17.3 example of ram backup for saving power consumption 17.4 exiting ram backup mode (wakeup)
17 17-2 ram backup mode 32176 group user?s manual (rev.1.01) 17.1 outline of ram backup mode 17.1 outline of ram backup mode in ram backup mode, the contents of the internal ram are retained while the power is turned off. ram backup mode is used for the following two purposes: ? back up the internal ram data when the power is forcibly turned off from the outside (ram backup when the power is off) ? for the m32r/ecu to turn off the power to the cpu at any time as needed to reduce the system?s power consumption while retaining the internal ram data (ram backup for saving the power consumption) the m32r/ecu is placed in ram backup mode by applying a voltage of 3.0?5.5 v to the vdde pin (provided for ram backup) and 0 v to all other pins. during ram backup mode, the contents of the internal ram are retained, while the cpu and internal peripheral i/o remain idle. because all pins except vdde are held low during ram backup mode, the power consumption in the system can effectively be reduced. 17.2 example of ram backup when power is off a typical circuit for ram backup at power outage is shown in figure 17.2.1. the following explains how the ram can be backed up by using this circuit as an example. figure 17.2.1 typical circuit for ram backup at power outage vrefn sbi# adnini m32r/ecu (note 2) c backup battery vcc vdd vbb vref reference voltage for power outage detection power outage detection signal backup power supply for power outage output power supply monitor ic note 1: power outage is detected by the dc in (regulator input) voltage. note 2: these pins are used to detect a ram backup signal. note 3: this pin outputs a high when the power is on and outputs a low when the power is off. dc in input regulator (5v or 3.3v) vdde avccn out vcce excvcc excosc-vcc excvdd vcce (note 3) (note 1)
17 17-3 ram backup mode 32176 group user?s manual (rev.1.01) 17.2.1 normal operating state figure 17.2.2 shows the normal operating state of the m32r/ecu. during normal operation, input on the sbi# pin or adnini (i = 0?15) pin which is used to detect a ram backup signal remains high. figure 17.2.2 normal operating state backup power supply for power outage reference voltage for power outage detection power outage detection signal "h" 3.3v or 5v vrefn sbi# adnini m32r/ecu c vcc vdd vbb vref dc in (5v or 3.3v) vdde avccn out vcce excvcc excosc-vcc excvdd vcce 3.3v or 5v (note 2) note 1: power outage is detected by the dc in (regulator input) voltage. note 2: these pins are used to detect a ram backup signal. note 3: this pin outputs a high when the power is on and outputs a low when the power is down. regulator (note 3) input output (note 1) backup battery power supply monitor ic 17.2 example of ram backup when power is down
17 17-4 ram backup mode 32176 group user?s manual (rev.1.01) (a) (b) (c) "l" 0v vrefn sbi# adnini m32r/ecu c vcc vdd vbb vref dc in (5v or 3.3v) vdde avccn out vcce excvcc excosc-vcc excvdd vcce (note 2) backup battery reference voltage for power outage detection power outage detection signal backup power supply for power outage power supply monitor ic note 1: power outage is detected by the dc in (regulator input) voltage. note 2: these pins are used to detect a ram backup signal. note 3: this pin outputs a high when the power is on and outputs a low when the power is off . note 4: determined by the input level on sbi# pin or adnini pin. note 5: the time needed for processing in (b) is secured by adjusting the capacitance. input output regulator (note 3) (note 1) (note 5) 3.0?5.5v example of ram backup processing power goes off (note 4) create data for backup ram check ram backup mode 17.2 example of ram backup when power is down 17.2.2 ram backup state figure 17.2.3 shows the power outage ram backup state of the m32r/ecu. when the power supply goes off, the power supply monitor ic starts feeding current from the backup battery to the m32r/ecu. also, the power supply monitor ic?s power outage detection pin outputs a low, causing the sbi# pin or adnini pin to go low, which generates a ram backup signal ((a) in figure 17.2.3). determination of whether the power is off must be made with respect to the dc in (regulator input) voltage in order to allow for a software processing time at power outage. to enable ram backup mode, make the following setting: (1) create data for ram check to verify whether the ram data has been retained normally after returning from ram backup mode to normal mode ((b) in figure 17.2.3). if the power supply to vcce goes off after making above setting, the vdde pin voltage goes to 3.0?3.3 v and all other pin voltages drop to 0 v, and the m32r/ecu is thereby placed in ram backup mode ((c) in figure 17.2.3). figure 17.2.3 power outage ram backup state
17 17-5 ram backup mode 32176 group user?s manual (rev.1.01) port x ib dc in output output vrefn sbi# adnini m32r/ecu vdde avccn vcce excvcc excosc-vcc excvdd vcce (5v or 3.3v) (5v or 3.3v) ram backup signal external circuit (note 1) (note 3) ram backup power supply regulator input regulator (note 2) note 1: this circuit outputs a low during ram backup. note 2: this port outputs a high when the power is on, and is set for input mode when in ram backup mode. note 3: these pins are used to detect a ram backup signal. figure 17.3.1 typical ram backup circuit for saving power consumption 17.3 example of ram backup for saving power consumption a typical ram backup circuit for saving the microcomputer?s power consumption is shown in figure 17.3.1. the follow- ing explains how the ram is backed up for the purpose of low-power operation by using this circuit as an example. 17.3 example of ram backup for saving power consumption
17 17-6 ram backup mode 32176 group user?s manual (rev.1.01) 17.3.1 normal operating state figure 17.3.2 shows the normal operating state of the m32r/ecu. during normal operation, the ram backup signal output by the external circuit is high. also, input on the sbi# pin or adnini (i = 0?15) pin which is used to detect a ram backup signal remains high. port x, which connects to the transistor?s base, should output a high. this causes the transistor?s base voltage, ib, to go high so that current is fed from the power supply to the vcce pin via the transistor. figure 17.3.2 normal operating state "h" "h" "h" ib dc in vrefn sbi# adnini m32r/ecu vdde avccn vcce excvcc excosc-vcc excvdd vcce 3.3v or 5v (5v or 3.3v) (5v or 3.3v) 3.3v or 5v ram backup signal (note 1) external circuit port x (note 3) ram backup power supply regulator input output regulator (note 2) output note 1: this circuit outputs a low during ram backup. note 2: this port outputs a high when the power is on, and is set for input mode when in ram backup mode (one of the port pins selected). note 3: these pins are used to detect a ram backup signal. 17.3 example of ram backup for saving power consumption
17 17-7 ram backup mode 32176 group user?s manual (rev.1.01) 17.3 example of ram backup for saving power consumption 17.3.2 ram backup state figure 17.3.3 shows the ram backup state of the m32r/ecu. figure 17.3.4 shows a ram backup sequence. when the external circuit outputs a low, input on the sbi# or adnini pin is pulled low. a low on these input pins generates a ram backup signal (a and (a) in figure 17.3.3). to enable ram backup mode, make the following settings: (1) create data for ram check to verify after returning from ram backup mode to normal mode whether the ram data has been retained normally ((b) in figure 17.3.3). (2) to materialize low-power operation, set all programmable input/output pins except port x for input mode (or for output mode, with the output level fixed low) ((c) in figure 17.3.3). (3) set port x for input mode (b and (d) in figure 17.3.3). this causes the transistor?s base voltage, ib, to go low, so that the power to all power supply pins except vdde is shut off (c and d in figure 17.3.3). by settings in (1) to (3), the vdde pin voltage goes to 3.0?5.5 v and all other pin voltages drop to 0 v, and the m32r/ecu is thereby placed in ram backup mode ((d) in figure 17.3.3). figure 17.3.3 ram backup state for low power operation "l" b c (a) (b) (c) (d) "l" "l" "l" "l" ib 0v a d dc in vrefn sbi# adnini m32r/ecu vdde avccn vcce excvcc excosc-vcc excvdd vcce 3.3v or 5v (5v or 3.3v) (5v or 3.3v) example of ram backup processing ram backup signal external circuit port x (note 1) (note 3) ram power supply regulator input output regulator (note 2) output note 1: this circuit outputs a low during ram backup. note 2: this port outputs a high when the power is on, and is set for input mode when in ram backup mode (one of the port pins selected). note 3: these pins are used to detect a ram backup signal. note 4: determined by the input level on sbi# pin or adnini pin. note 5: base voltage ib = 0 causes the power to all power supply pins except vdde to stop. see a to d in the above explanation. generate a ram backup signal (note 4) create data for backup ram check set the pin connecting to the transistor's base (port x) for input mode (note 5) ram backup mode
17 17-8 ram backup mode 32176 group user?s manual (rev.1.01) 17.3 example of ram backup for saving power consumption reset# sbi# adnini vdde f(xin) vcce, vrefn , avccn 0v oscillation stabilization time external input signal goes low ram backup period power on port output setting (high level) external input signal goes high port x port input mode 5.0v or 3.3v port output setting (high level) oscillation stabilization time figure 17.3.4 example of a ram backup sequence for low power operation 17.3.3 precautions to be observed at power-on when changing port x from input mode to output mode after power-on, pay attention to the following. if port x is set for output mode while no data is set in the port x data register, the port?s initial output level is instable. therefore, before changing port x for output mode, make sure the port x data register is set to output a high. unless this precaution is followed, port output may go low at the same time the port is set for output after the oscillation has stabilized, causing the microcomputer to enter ram backup mode.
17 17-9 ram backup mode 32176 group user?s manual (rev.1.01) 17.4 exiting ram backup mode (wakeup) 17.4 exiting ram backup mode (wakeup) the processing to place the m32r/ecu out of ram backup mode and return it to normal operation mode is referred to as ?wakeup? processing. figure 17.4.1 shows an example of wakeup processing. wakeup processing is initiated by applying a reset. the following shows how to execute wakeup processing. (1) reset the microcomputer ((a) in figure 17.4.1). (2) set port x for output mode and output a high from the port ((b) in figure 17.4.1) (note 1) (3) compare the ram content against the ram check data created before entering ram backup mode ((c) in figure 17.4.1). (4) if the comparison in (3) did not match, initialize the ram ((d) in figure 17.4.1). if the comparison in (3) matched, use the retained data in the program. (5) initialize each internal circuit ((e) in figure 17.4.1) before returning to the main routine ((f) in figure 17.4.1). note 1: for wakeup from power outage ram backup mode, port x settings are unnecessary. figure 17.4.1 wakeup processing ok error compare ram content against backup ram check data initialize the ram example of wakeup processing reset set the transistor's base connecting pin (port x) for high-level output mode (note 1) initialize each circuit to the main routine (a) (b) (c) (d) (e) (f) note 1: for wakeu p from p ower outa g e ram backu p mode, p ort x settin g s are unnecessar y .
17 17-10 ram backup mode 32176 group user?s manual (rev.1.01) this page is blank for reasons of layout. 17.4 exiting ram backup mode (wakeup)
chapter 18 oscillator circuit 18.1 oscillator circuit 18.2 clock generator circuit
18 18-2 oscillator circuit 32176 group user?s manual (rev.1.01) 18.1 oscillator circuit the 32176 contains an oscillator circuit that supplies operating clocks for the cpu core, internal peripheral i/o and internal memory. the frequency supplied to the clock input pin (xin) is multiplied by 4 by an internal pll circuit to produce the cpu clock, which is the operating clock for the cpu core and internal memory. the frequency of this clock is divided by 2 in the subsequent circuit to produce the peripheral clock, which is the operating clock for the internal peripheral i/o and external data bus. 18.1.1 example of an oscillator circuit an oscillator circuit can be configured by connecting a ceramic (or crystal) resonator between the xin and xout pins external to the chip. figure 18.1.1 shows an example of a system clock generating circuit illustrating a resonator connected external to the chip. for the constants rf, cin, cout and rd, the resonator manufacturer should be consulted to determine the appropriate values. to use an externally sourced clock signal without using an internal oscillator circuit, connect the external clock signal to the xin pin and leave the xout pin open. 18.1 oscillator circuit figure 18.1.1 example of an oscillator circuit m32r/ecu excosc-vcc xout osc-vss rf rd c in c out bclk/p70 c oscillator circuit to the peripheral clock pll circuit oscillator module to the cpu clock 1/2 oscillation stoppage detection circuit xin
18 18-3 oscillator circuit 32176 group user?s manual (rev.1.01) 18.1 oscillator circuit 18.1.2 xin oscillation stoppage detection function the 32176 contains a detection circuit to find whether oscillation input to the pll circuit has stopped. the pll circuit oscillates with the frequency of its normal mode of vibration in the absence of the reference oscillation input. the xin oscillation input is sampled at the multiply-by-n frequency of the pll circuit and when the xin oscillation is found to be at the same level, the xstat bit is set. because the cpu continues operating with the pll circuit?s natural frequency even when the xin oscillation has stopped, error handling for the stoppage of xin oscillation can be accomplished by inspecting xstat in software. figure 18.1.2 block diagram of the xin oscillation stoppage detection circuit port input special function control register (picnt) 9 1011121314b15 b8 pien0 pisel x s ta t 0 00 0 0 0 0 0 b bit name function r w 8?10 no function assigned. fix to "0". 0 0 11 xstat 0: xin osci llating r (note1) xin oscillation status bit 1: xin inactive 12?13 no function assigned. fix to "0". 0 0 14 pisel 0: content of port output latch r w port input data select bit 1: port pin level 15 pien0 0: disable input r w port input enable bit 1: enable input note 1: only writing "0" is effective. writing "1" has no effect; the bit retains the value it had before the write. for details about the function of the port input data select bit (pisel) and port input enable bit (pien0), see section 8.3.5, ?port input special function control register.? determination circuit oscillator circuit pll circuit counter xin x s tat flag xin oscillation stoppage detection circuit
18 18-4 oscillator circuit 32176 group user?s manual (rev.1.01) 18.1 oscillator circuit (1) xstat (xin oscillation status) bit (bit 11) 1) conditions under which xstat is set to "1" xstat is set to "1" upon detecting that xin oscillation has stopped. when xin remains at the same level for a predetermined time (3 bclk periods up to 4 bclk periods), xin oscillation is assumed to have stopped. when operating normally, xin changes state (high or low) once every bclk period. 2) conditions under which xstat is cleared to "0" xstat is cleared to "0" by a system reset or by writing "0". if xstat is cleared at the same time it is set to "1" in 1) above, the former has priority so that xstat is cleared. writing "1" to xstat is ignored. 3) method for detecting xin oscillation stoppage by using xstat because the m32r/ecu internally contains a pll, the internal clock remains active even when xin oscillation has stopped. by reading xstat without clearing it after exiting the reset state, it is possible to know whether xin has stopped since the reset signal was deasserted. similarly, by reading xstat after clearing it by writing 0, it is possible to know the current oscillating status of xin. (however, there must be an interval of at least 10 bclk periods (20 cpu clock periods) between read and write.) figure 18.1.3 procedure for setting xstat read xstat (1) to know whether xin oscillation has stopped after being reset write xstat = 0 (2) to know the current status of xin oscillation wait for 20 cpu clock periods or more read xstat wait before inspecting xstat
18 18-5 oscillator circuit 32176 group user?s manual (rev.1.01) 18.1 oscillator circuit 18.1.3 oscillation drive capability select function the microcomputer incorporates a four-stage oscillation drive capability select function. once the oscillation of the oscillator circuit has stabilized, the xin-xout drive capability can be lowered. the lower the drive capability, the smaller the amount of power consumption. clock control register (clkcr) 123456b7 b0 xdrvp xdrv 011 0 0 0 0 0 b bit name function r w 0?4 no function assigned. fix to "0". 00 5 xdrvp 0w xdrv write control bit 6?7 xdrv xin-xout drive capability (performance ratio) r w xin-xout drive capability select bit 00: low 0.25 01: 0.50 10: 0.75 11: high 1.00 (1) xdrv write control bit (xdrvp) (bit 5) this bit controls writing to the xin-xout drive capability select bits. (2) xin-xout drive capability select bits (bits 6, 7) the following shows the procedure for writing to these bits. 1. set the write control bit (xdrvp) to "1". 2. immediately following the above, reset the write control bit (xdrvp) to "0" and write the appropriate value to the xin-xout drive capability select bits. note: ? if a write cycle to any other area occurs between 1 and 2, write to xdrv has no effect and the written value is not reflected. therefore, disable interrupts and dma transfers before setting the drive capability control bits. note that a pair of two consecutive writes comprise a write opera- tion.
18 18-6 oscillator circuit 32176 group user?s manual (rev.1.01) if a write cycle to other area exists in this interval, settings of xdrv bits are not reflected. xdrvp "1" xdrvp "0" xdrv set value  example of correct setting  settings that do not have effect because a write cycle to other area exists, the set value is not reflected. xdrvp "1" write to other area xdrvp "0" xdrv set value (1) (2) because these two consecutive writes comprise a pair, the next set value is not reflected. xdrvp "1" xdrvp "1" xdrvp "0" xdrv set value figure 18.1.4 procedure for setting the oscillation drive capability 18.1 oscillator circuit
18 18-7 oscillator circuit 32176 group user?s manual (rev.1.01) 18.1.4 system clock output function a clock whose frequency is twice that of the input clock (i.e., the peripheral clock) can be output from the bclk pin. the bclk pin is shared with port p70. to use this pin to output the peripheral clock, set the p7 operation mode register (p7mod) bit 8 to "1". configuration of the p7 operation mode register is shown below. p7 operation mode register (p7mod) b bit name function r w 8 p70md 0:p70 r w port p70 operation mode bit 1:bclk 9 p71md 0:p71 r w port p71 operation mode bit 1:wait# 10 p72md 0:p72 r w port p72 operation mode bit 1:hreq# 11 p73md 0:p73 r w port p73 operation mode bit 1:hack# 12 p74md 0:p74 r w port p74 operation mode bit 1:rtdtxd 13 p75md 0:p75 r w port p75 operation mode bit 1:rtdrxd 14 p76md 0:p76 r w port p76 operation mode bit 1:rtdack 15 p77md 0:p77 r w port p77 operation mode bit 1:rtdclk 18.1.5 oscillation stabilization time at power-on the oscillator circuit comprised of a ceramic (or crystal) resonator requires a finite time before its oscillation stabilizes after being powered on. therefore, there must be a certain amount of oscillation stabilization time that suits the oscillator circuit used. figure 18.1.5 shows an oscillation stabilization time required at power-on. 18.1 oscillator circuit 9 1011121314b15 b8 p70md p71md p72md p73md p74md p75md p76md p77md 00000000 figure 18.1.5 oscillation stabilization time at power-on reset# xin oscillation stabilization time main power supply
18 18-8 oscillator circuit 32176 group user?s manual (rev.1.01) 18.2 clock generator circuit 18.2 clock generator circuit supply independent clocks to the cpu and the internal peripheral circuit. xin pin (8mhz?10mhz) bclk(peripheral clock) (16mhz?20mhz) cpuclk(cpu clock) (32mhz?40mhz) x4 1/2 pll figure 18.2.1 conceptual diagram of clock generation
chapter 19 jtag 19.1 outline of jtag 19.2 configuration of jtag circuit 19.3 jtag registers 19.4 basic operation of jtag 19.5 boundary scan description language 19.6 notes on board design when connecting jtag 19.7 processing pins when not using jtag
19 19-2 jtag 32176 group user?s manual (rev.1.01) 19.1 outline of jtag 19.1 outline of jtag the m32r/ecu contains a jtag (joint test action group) interface compliant with ieee standard test access port and boundary-scan architecture (ieee std. 1149.1a-1993). this jtag interface can be used as an input/ output path for boundary-scan test (boundary-scan path). for details about ieee 1149.1 jtag test access ports, see ieee std. 1149.1a-1993 documentation. note: ? the jtag interface in the m32r/ecu is used to connect a jtag emulator during debugging as well. in this chapter, the jtag interface is explained assuming its use as an input/output path for boundary- scan test. functions of the jtag interface-related pins mounted on the m32r/ecu are shown below. table 19.1.1 jtag pin functions type pin name signal name i/o function tap jtck test clock input clock input to the test circuit. (note 1) jtdi test data input input synchronous serial data input pin used to supply the test instruction code and test data. this input is sampled on the rising edge of jtck. jtdo test data output output synchronous serial data output pin used to output the test instruction code and test data. this signal changes state on the falling edge of jtck, and is output in only the shift-ir or shift-dr state. otherwise, it goes to a high-impedance state. jtms test mode select input test mode select input to control the test circuit?s state transition. this input is sampled on the rising edge of jtck. jtrst test reset input active-low test reset input to initialize the test circuit asynchronously. to ensure that the test circuit is reset without fail, jtms input signal must be held high while this signal changes state from low to high. note: tap stands for test access port (jtag interface specified in ieee 1149.1).
19 19-3 jtag 32176 group user?s manual (rev.1.01) figure 19.2.1 configuration of the jtag circuit 19.2 configuration of jtag circuit the jtag circuit consists of the following circuit blocks. ? instruction register to hold the instruction code that is fetched through the boundary-scan path ? a set of registers which are accessed through the boundary-scan path ? test access port (abbreviated tap) controller to control the jtag unit?s state transition ? control logic to select input, output, etc. the figure below shows the configuration of the jtag circuit. 19.2 configuration of jtag circuit jtck jtms jtrst tap controller instruction register (6-bit) (jtagir) decoder jtdo id code register (jtagidr) bypass register (jtagbpr) boundary scan register (jtagbsr) jtdi data register set buffer outpu t selection output selection m32r/ecu
19 19-4 jtag 32176 group user?s manual (rev.1.01) 19.3 jtag registers 19.3 jtag registers 19.3.1 instruction register (jtagir) the instruction register is a 6-bit register to hold instruction code. this register is set in the ir path sequence. the instructions set in this register determine the data register to be selected in the subsequent dr path sequence. the initial value of this register after test is reset (to initialize the test circuit) is b?000010 (idcode instruction). after a test reset, the id code register is selected as the data register until instruction code is set by an external device. in the capture-ir state, this register always has b?110001 (fixed value) loaded into it. therefore, when in the shift-ir state, no matter what value was set in this register, the value b?110001 is always output from the jtdo pin (sequentially beginning with the lsb). however, this value normally is not handled as instruction code. shown below is outside the scope of guaranteed operations. if this operation is attempted, the microcomputer may handle b?110001 as instruction code, which makes the microcomputer unable to operate normally. capture-ir table 19.3.1 jtag instruction list instruction code abbreviation operation b'000000 extest test the circuit/board-level connections external to the chip. b'000001 sample/preload sample the operating status of the circuit and output the sampled status from the jtdo pin, while at the same time supplying the data used for boundary-scan test from the jtdi pin and preset it in the boundary scan register. b'000010 idcode select the id code register to output the device and manufacturer identification data from the jtdo pin. b'111111 bypass select the bypass register to inspect or set data. notes: ? do not set any other instruction code. ? for details about the ir path sequence, dr path sequence, test reset, capture-ir state, shift-ir state, exit1-ir state and update-ir state, see section 19.4, ?basic operation of jtag.?
19 19-5 jtag 32176 group user?s manual (rev.1.01) 19.3 jtag registers 19.3.2 data register (1) boundary scan register (jtagbsr) the boundary scan register is a 475-bit register used to perform boundary-scan test. the bits in this register are assigned to each pin on the microcomputer. connected between the jtdi and jtdo pins, this register is selected when issuing extest or sample/ preload instruction. in the capture-dr state, this register captures the status of input pins or internal logic outputs. in the shift-dr state, while outputting the sampled value, this register receives the input data for boundary-scan test to set pin functions (direction of input/output and tristate output pins) and output values. (2) bypass register (jtagbpr) the bypass register is a 1-bit register used to bypass the boundary-scan path when the microcomputer is not the target of boundary-scan test. connected between the jtdi and jtdo pins, this register is selected when issuing bypass instruction. this register is loaded with b?0 (fixed value) in the capture-dr state. (3) id code register (jtagidr) the id code register is a 32-bit register used to identify the device and manufacturer. it holds the following information: ? version information (4 bits) : b?0000 ? part number (16 bits) : b?0011 0010 0010 0100 ? manufacturer id (11 bits) : b?000 0001 1100 this register is connected between the jtdi and jtdo pins, and is selected when issuing idcode instruc- tion. this register is loaded with said idcode data in the capture-dr state, and outputs it from the jtdo pin in the shift-dr state. the id code register is a read-only register. because the data written from the jtdi pin during dr path sequence is ignored, make sure jtdi input = low while in the shift-dr state. note: ? for details about the capture-dr and shift-dr states, see section 19.4, ?basic operation of jtag.? 3 0 4 19 20 31 30 1 manufacturer id part number version 4 bits 16 bits 11 bits
19 19-6 jtag 32176 group user?s manual (rev.1.01) 19.4 basic operation of jtag 19.4.1 outline of jtag operation the instruction and data registers basically are accessed in conjunction with the following three operations, which are performed based on the tap controller?s state transition. the tap controller changes state accord- ing to jtms input, and generates control signals required for operation in each state. ? capture operation the result of boundary-scan test or the fixed data defined for each register is sampled. as a register opera- tion, data input is latched into the shift register stage. ? shift operation the register is accessed from outside through the boundary-scan path. the sample value is output to the outside at the same time data is set from the outside. as a register operation, the bits are shifted right between each shift register stage. ? update operation the data set from the outside during shifting is driven. as a register operation, the value set in the shift register stage is transferred to the parallel output stage. the jtag interface undergoes transition of the internal state depending on jtms input and on such state transition, it performs the following two operations. in either case, the operation basically is performed in order of capture ? ir path sequence instruction code is set in the instruction register to select the data register to be operated on in the subse- quent dr path sequence. ? dr path sequence data inspection or setting is performed for the selected data register. 19.4 basic operation of jtag
19 19-7 jtag 32176 group user?s manual (rev.1.01) select-dr-scan test-logic-reset run-test/idle 0 1 0 capture-dr 0 shift-dr 0 exit1-dr 1 pause-dr 0 exit2-dr 1 update-dr 1 0 0 1 0 1 1 0 select-ir-scan capture-ir 0 shift-ir 0 exit1-ir 1 pause-ir 0 exit2-ir 1 update-ir 1 0 0 1 0 1 1 0 1 1 note:  the values (0 or 1) in this diagram denote the state of jtms input signal. 1 figure 19.4.1 tap controller state transition the state transition of the tap controller and the basic configuration of the jtag related registers are shown below. data input g 0 1 d t q d t q shift-dr or shift-ir clock-dr or clock-ir update-dr or update-ir from the preceding cell to the next cell data output parallel output stage shift register stage input multiplexer note:  this diagram only shows the basic configuration; not all dr and ir are configured the same way as shown here. figure 19.4.2 basic configuration of the jtag related registers 19.4 basic operation of jtag
19 19-8 jtag 32176 group user?s manual (rev.1.01) jtck select-dr-s can select-ir-s can capture-ir shift-ir exit1-ir update-ir run-test/id le run-test/id le don't care don't care instruction code (6 bits) 1 0 0 0 1 1 lsb value msb value jtms tap states jtdi jtdo high impedance high impedance shift output from the instruction register is fixed to b'110001. finished storing instruction code in the instruction register's shift register stage. instruction code is set in the parallel output stage at fall of jtck in the update-ir state. jtdi input is sampled at rise of jtck in the shift-ir state. jtdo is output at fall of jtck in the shift-ir state. figure 19.4.3 ir path sequence 19.4 basic operation of jtag 19.4.2 ir path sequence instruction code is set in the instruction register (jtagir) to select the data register to be accessed in the subsequent dr path sequence. the ir path sequence is performed following the procedure described below. (1) from the run-test/idle state, apply jtms = high for a period of 2 jtck cycles to enter the select-ir- scan state. (2) apply jtms = low to enter the capture-ir state. at this time, b?110001 (fixed value) is set in the instruc- tion register?s shift register stage. (3) proceed and apply jtms = low to enter the shift-ir state. in the shift-ir state, the value of the shift register stage is shifted right one bit every cycle, and the data b?110001 (fixed value) that was set in (2) is serially output from the jtdo pin. at the same time, instruction code is set in the shift register stage bit by bit as it is serially fed from the jtdi pin. because the instruction code is set in the instruction register that consists of 6 bits, the shift-ir state must be continued for a period of 6 jtck cycles. to stop the shift operation in the middle of the execution, enter the pause-ir state via the exit1-ir state (by setting jtms input from high to low). to return from the pause-ir state, enter the shift-ir state via the exit2-ir state (by setting jtms input from high to low). (4) apply jtms = high to move from the shift-ir state to the exit1-ir state. this completes the shift operation. (5) proceed and apply jtms = high to enter the update-ir state. in the update-ir state, the instruction code that was set in the instruction register?s shift register stage is transferred to the instruction register?s parallel output stage, and decoding of jtag instruction is thereby started. (6) proceed and apply jtms = high to enter the select-dr-scan state or jtms = low to enter the run-test/ idle state.
19 19-9 jtag 32176 group user?s manual (rev.1.01) 19.4.3 dr path sequence data inspection or setting is performed for the data register selected in the ir path sequence prior to the dr path sequence. the dr path sequence is performed following the procedure described below. (1) from the run-test/idle state, apply jtms = high for a period of 1 jtck cycle to enter the select-dr- scan state. which data register will be selected at this time depends on the instruction that was set during the ir path sequence performed prior to the dr path sequence. (2) apply jtms = low to enter the capture-dr state. at this time, the result of boundary-scan test or the fixed data defined for each register is set in the data register?s shift register stage. (3) proceed and apply jtms = low to enter the shift-dr state. in the shift-dr state, the dr value is shifted right one bit every cycle, and the data that was set in (2) is serially output from the jtdo pin. at the same time, setup data is set in the data register?s shift register stage bit by bit as it is serially fed from the jtdi pin. by continuing the shift-ir state as long as the number of bits that comprise the selected data register (by applying jtms = low), all bits of data can be set in and read out from the shift register stage. to stop the shift operation in the middle of the execution, enter the pause-dr state via the exit1-dr state (by setting jtms input from high to low). to return from the pause-dr state, enter the shift-dr state via the exit2-dr state (by setting jtms input from high to low). (4) apply jtms = high to move from the shift-dr state to the exit1-dr state. this completes the shift operation. (5) proceed and apply jtms = high to enter the update-dr state. in the update-dr state, the data that was set in the data register?s shift register stage is transferred to the parallel output stage, and the setup data is thereby made ready for use. (6) proceed and apply jtms = high to enter the select-dr-scan state or jtms = low to enter the run-test/idle state. 19.4 basic operation of jtag figure 19.4.4 dr path sequence jtck select-dr-s can capture-dr shift-dr exit1-dr update-dr run-test/id le run-test/id le don't care don't care lsb value msb value jtms tap states jtdi jtdo high impedance high impedance note:  because all bits in the data register's shift register stage also are shifted right, data is output from jtdo beginning with the lsb. similarly, data is supplied to jtdi beginning with the lsb. finished storing setup data in the selected data register's shift register stage. setup data is set in the parallel output stage at fall of jtck in the update-dr state. jtdi input is sampled at rise of jtck in the shift-dr state. jtdo is output at fall of jtck in the shift-dr state.
19 19-10 jtag 32176 group user?s manual (rev.1.01) note 1: the setup value for each register must be supplied to the jtdi pin beginning with the lsb. note 2: the value in each register is output to the jtdo pin beginning with the lsb. it is only in the shift-ir state of ir pat h sequence and the shift-dr state of dr path sequence that valid data is output from the jtdo pin. in all other states , the jtdo pin goes to a high-impedance state. note 3: this shows readout from the data register selected by the instruction that was set in the immediately preceding ir path sequence. the value sampled during capture-dr state is output at the shift register stage of the selected data regis ter. test-logic- reset state run-test /idle state ir path sequence dr path sequence run-test /idle state ir path sequence dr path sequence tap states instruction code #0 setup data #0 #1 setup data #1 jtdi fixed value b'110001 (note 3) b'110001 jtdo setup data is serially fed from jtdi. reference data is serially output from jtdo. (1) basic access test-logic- reset state run-test /idle state ir path sequence dr path sequence #0 #0 #1 #2 jtdi b'110001 (note 3) jtdo the same data register can be successively operated on to set or inspect. (2) successive accesses to the same data register run-test /idle state (note 3) (note 3) specify the data register to inspect or set. (note 1) (note 2) (note 1) (note 2) dr path sequence dr path sequence setup data setup data (note 3) fixed value fixed value specify the data register to inspect or set. tap states instruction code instruction code setup data figure 19.4.5 successive jtag access 19.4.4 inspecting and setting data registers to inspect or set the data register, follow the procedure described below. (1) to access the test access port (jtag) for the first time, apply a test reset (to initialize the test circuit). one of the following two methods may be used to apply a test reset: ? pull the jtrst pin low. ? drive the jtms pin high to apply 5 or more jtck cycles (2) apply jtms = low to enter the run-test/idle state. to continue the idle state, hold jtms input low. (3) apply jtms = high to exit the run-test/idle state and perform ir path sequence. in the ir path se- quence, specify the data register to inspect or set. (4) proceed to perform dr path sequence. feed setup data from the jtdi pin into the data register specified in the ir path sequence, and read out reference data from the jtdo pin. (5) to proceed to perform ir path or dr path sequence after the dr path sequence is completed, apply jtms = high to return to the select-dr-scan state. to wait for the next processing after a series of ir and dr sequence processing is completed, apply jtms = low to enter the run-test/idle state and keep that state. 19.4 basic operation of jtag
19 19-11 jtag 19.5 boundary scan description language 32176 group user?s manual (rev.1.01) 19.5 boundary scan description language the boundary scan description language (abbreviated bsdl) is described in the supplements to the standard test access port and boundary-scan architecture of ieee 1149.1-1990 and ieee 1149.1a-1993. bsdl is a subset of ieee 1076-1993 standard vhsic hardware description language (vhdl). bsdl allows to precisely describe the functions of conforming components to be tested. for package connection test, this language is used by automated test pattern generation tools, and for synthesized test logic and verification, this language is used by electronic design automation tools. bsdl provides powerful extended functions usable in internal test generation and necessary to write hardware debug and diagnostics software. the primary section of bsdl has statements of logical port description, physical pin map, instruction set and boundary register description. ? logical port description the logical port description assigns meaningful symbol names to each pin on the chip. the logic type of each pin, whether input, output, input/output, buffer or link, that defines the logical direction of signal flow is deter- mined here. ? physical pin map the physical pin map correlates the chip?s logical ports to the physical pins on each package. by using separate names for each map, it is possible to define two or more physical pin maps in one bsdl description. ? instruction set statement the instruction set statement writes bit patterns to be shifted in into the chip?s instruction register. this bit pattern is necessary to place the chip into each test mode defined in standards. instructions exclusive to the chip can also be written. ? boundary register description the boundary register description is a list of boundary register cells or shift stages. each cell is assigned a separate number. the cell with number 0 is located nearest to the test data output (jtdo) pin, and the cell with the largest number is located nearest to the test data input (jtdi) pin. cells also contain related other information which includes cell type, logical port corresponding to the cell, logical function of the cell, safety value, control cell number, disable value and result value.
19 19-12 jtag 32176 group user?s manual (rev.1.01) 19.6 notes on board design when connecting jtag 19.6 notes on board design when connecting jtag to materialize fast and highly reliable communication with jtag tools, make sure wiring lengths of jtag pins are matched during board design. m32r/ecu jtdi jtms jtck jtrst user board jtag tool make sure wiring lengths are the same, and avoid bending wires as much as possible. be careful not to use through-holes within the wiring. jtdo 33 ? ? ? ? ? ? ? ? ? ? ? ?
19 19-13 jtag 32176 group user?s manual (rev.1.01) 19.7 processing pins when not using jtag m32r/ecu jtdi jtms jtck jtrst user board jtdo vcce(5v) 0?100k  0?100k  0?100k  0?100k  0?100k  note:  only if the jtrst pin is firmly tied to ground, the jtdo, jtdi, jtms and jtclk pins can be processed b y either pullup or pulldown. 19.7 processing pins when not using jtag the following shows how the pins on the chip should be processed when not using jtag tools. figure 19.7.1 processing pins when not using jtag
19 19-14 jtag 32176 group user?s manual (rev.1.01) this page is blank for reasons of layout. 19.7 processing pins when not using jtag
chapter 20 power supply circuit 20.1 configuration of the power supply circuit 20.2 power-on sequence 20.3 power-off sequence
20 20-2 power supply circuit 32176 group user?s manual (rev.1.01) 20.1 configuration of the power supply circuit the 32176 operates with a single 5 v 0.5 v or 3.3 v 0.3 v single power supply. unless otherwise noted, 5 v 0.5 v and 3.3 v 0.3 v in this chapter are referred to simply by 5 v and 3.3 v, respectively. table 20.1.1 power supply functions power supply type pin name function 5.0v or 3.3v vcce main power supply avcc0 power supply for the a-d converter vref0 reference voltage for the a-d converter vdde power supply for the internal ram backup excvcc external capacitor connection pin excvdd external capacitor connection pin excosc-vcc external capacitor connection pin figure 20.1.1 configuration of the power supply circuit (vcce = 5.0 v or 3.3 v) 20.1 configuration of the power supply circuit i/o control circuit cpu peripheral circuit flash memory a-d converter circuit ram internal voltage generator circuit main vdc backup voltage generator circuit sub-vdc oscillator circuit external bus pll excvcc excosc-vcc excvdd vdde vcce (20,65,132pin) avcc 32176 control signal vcce (95pin)
20 20-3 power supply circuit 32176 group user?s manual (rev.1.01) 20.2 power-on sequence 20.2 power-on sequence 20.2.1 power-on sequence when not using ram backup the diagram below shows a turn-on sequence of the power supply (5.0 v or 3.3 v) when not using ram backup. 0v 0v 0v 0v vcce,vdde avcc vref reset# note 1: after turning on all power supplies and holding the reset# pin low for an oscillation stabilization time, release the reset# pin back high (to exit the reset state). notes: ? power-on limitation vdde vcce  however, if the above power-on limitation cannot be met, sufficient evaluation must be made during system design in order to ensure that no power will be applied to the microcomputer with a potential difference of 1 v or more. for potential differences 0 v to 0.6 v, there is almost no in-flow current. the amount of in-flow current begins t o increase when the potential difference exceeds 0.6 v. (note 1) figure 20.2.1 power-on sequence when not using ram backup
20 20-4 power supply circuit 32176 group user?s manual (rev.1.01) (note 2) 3.0v (note 1) vcce avcc vref reset# vdde 0v 0v 0v 0v 0v note 1: after turning on all power supplies and holding the reset# pin low for an oscillation stabilization time, release the reset# pin back high (to exit the reset state). note 2: because of ram backup, it is assumed that vdde is 3.0 v or more. the diagram here is shown for the vcce = 5 v case. notes:  power-on limitation vdde vcce  however, if the above power-on limitation cannot be met, sufficient evaluation must be made during system design in order to ensure that no power will be applied to the microcomputer with a potential difference of 1 v or more. for potential differences 0 v to 0.6 v, there is almost no in-flow current. the amount of in-flow current begins t o increase when the potential difference exceeds 0.6 v. if vdde is 3.0 v or more, there will be no problem even when the limitation vdde vcce cannot be met. figure 20.2.2 power-on sequence when using ram backup 20.2.2 power-on sequence when using ram backup the diagram below shows a turn-on sequence of the power supply (5.0 v or 3.3 v) when using ram backup. 20.2 power-on sequence
20 20-5 power supply circuit 32176 group user?s manual (rev.1.01) 20.3 power-off sequence 20.3 power-off sequence 20.3.1 power-off sequence when not using ram backup the diagram below shows a turn-off sequence of the power supply (5.0 v or 3.3 v) when not using ram backup. vcce avcc vref reset# vdde (note 1) 0v 0v 0v 0v 0v note 1: wait until the reset# pin goes low before turning the power supply off. notes:  power-off limitation vdde vcce  however, if the above power-off limitation cannot be met, sufficient evaluation must be made during system design in order to ensure that no power will be applied to the microcomputer with a potential difference of 1 v or more. for potential differences 0 v to 0.6 v, there is almost no in-flow current. the amount of in-flow current begins t o increase when the potential difference exceeds 0.6 v. figure 20.3.1 power-off sequence when not using ram backup
20 20-6 power supply circuit 32176 group user?s manual (rev.1.01) 20.3 power-off sequence 20.3.2 power-off sequence when using ram backup the diagram below shows a turn-off sequence of the power supply (5.0 v or 3.3 v) when using ram backup with hreq function. vcce avcc vref reset# vdde p72/hreq# 3v (note 1) (note 2) (note 3) (note 4) note 1: pull the hreq# input pin low to halt the cpu at the end of the bus cycle. or disable ram access in software. p72 can be used as hreq# irrespective of the operation mode. however, hreq# must be selected with the port operation mode register for p72. note 2: pull the reset# input pin low while the cpu is halted or ram access is disabled. note 3: wait until the reset# pin goes low before turning the power supply off. note 4: lower the vdde voltage from 5.0 v to 3.0 v as necessary. notes:  power-off limitation vdde vcce  however, if the above power-off limitation cannot be met, sufficient evaluation must be made during system design in order to ensure that no power will be applied to the microcomputer with a potential difference of 1 v or more. for potential differences 0 v to 0.6 v, there is almost no in-flow current. the amount of in-flow current begins to increase when the potential difference exceeds 0.6 v. 0v 0v 0v 0v 0v figure 20.3.2 power-off sequence when using ram backup (vcce = 5.0 v or 3.3 v)
20 20-7 power supply circuit 32176 group user?s manual (rev.1.01) vcce avcc vref reset# vdde p72/hreq# 3v (note 1) (note 2) (note 3) (note 4) note 1: pull the hreq# input pin low to halt the cpu at the end of the bus cycle. or disable ram access in software. p72 can be used as hreq# irrespective of the operation mode. however, hreq# must be selected with the port operation mode register for p72. note 2: pull the reset# input pin low while the cpu is halted or ram access is disabled. note 3: wait until the reset# pin goes low before turning the power supply off. note 4: lower the vdde voltage from 5.0 v to 3.0 v as necessary. notes:  power-off limitation vdde vcce  however, if the above power-off limitation cannot be met, sufficient evaluation must be made during system design in order to ensure that no power will be applied to the microcomputer with a potential difference of 1 v or more. for potential differences 0 v to 0.6 v, there is almost no in-flow current. the amount of in-flow current begins to increase when the potential difference exceeds 0.6 v. 0v 0v 0v 0v 0v figure 20.3.3 power-off sequence when using ram backup (vcce = 5.0 v, vdde = 3.3 v) 20.3 power-off sequence
20 20-8 power supply circuit 32176 group user?s manual (rev.1.01) 20.3 power-off sequence figure 20.3.4 microcomputer ready to operate state (vcce = 5.0 v or 3.3 v) i/o control circuit cpu peripheral circuit flash memory a-d converter circuit ram internal voltage generator circuit main vdc backup voltage generator oscillator circuit external bus pll 0v 0v 3.0 ? 5.5v vdde excvdd excvcc avcc 32176 0v excosc-vcc control signal vcce (20,65,132pin) vcce (95pin) figure 20.3.5 sram data backup state (vcce = 5.0 v or 3.3 v) i/o control circuit cpu peripheral circuit flash memory a-d converter circuit ram internal voltage generator circuit main vdc backup voltage generator circuit sub-vdc oscillator circuit external bus pll vdde excvdd excvcc avcc 5v or 3.3v 5v or 3.3v 5v or 3.3v 32176 5v or 3.3v control signal excosc-vcc vcce (20,65,132pin) vcce (95pin)
chapter 21 electrical characteristics 21.1 absolute maximum ratings 21.2 electrical characteristics when vcce = 5 v, f(xin) = 10 mhz 21.3 electrical characteristics when vcce = 5 v, f(xin) = 8 mhz 21.4 electrical characteristics when vcce = 3.3 v, f(xin) = 10 mhz 21.5 electrical characteristics when vcce = 3.3 v, f(xin) = 8 mhz 21.6 flash memory related characteristics 21.7 external capacitance for power supply 21.8 a.c. characteristics (when vcce = 5 v) 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-2 electrical characteristics 32176 group user?s manual (rev.1.01) 21.1 absolute maximum ratings absolute maximum ratings symbol parameter test condition rated value unit vcce main power supply -0.3?6.5 v vdde ram power supply -0.3?6.5 v avcc analog power supply vcce 21.1 absolute maximum ratings
21 21-3 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit min typ max vcce main power supply (note 1) 4.5 5.0 5.5 v vdde ram power supply (note 1) 4.5 5.0 5.5 v avcc analog power supply (note 1) 4.5 5.0 5.5 v vref reference voltage input (note 1) 4.5 5.0 5.5 v vih input high when when threshold selection 0.45vcce vcce v voltage threshold cmos input : 0.35 vcce switching is selected threshold selection 0.6vcce vcce v function is : 0.5vcce used threshold selection 0.8vcce vcce v : 0.7vcce when vt+/vt- 0.6vcce vcce v schmitt input : 0 .5vcce/0.35vcce is selected vt+/vt- 0.8vcce vcce v : 0.7vcce/0.35vcce vt+/vt- 0.8vcce vcce v : 0.7vcce/0.5vcce fp, mod0, 1, jtms, jtrst, jtdi, reset# 0.8vcce vcce v standard input for the following pins: 0.8vcce vcce v rtdclk, rtdrxd, sclki0, 1, rxd0?3, tclk0?3, tin0, 3, 16?23, crx0, 1 standard input for the following pins: db0?15, wait# 0.43vcce vcce v standard input for the following pins: sbi#, hreq# 0.6vcce vcce v vil input low when when threshold selection 0 0.25vcce v voltage threshold cmos input : 0.35vcce switching is selected threshold selection 0 0.4vcce v function : 0.5vcce is used threshold selection 0 0.6vcce v : 0.7vcce when vt+/vt- 0 0.25vcce v schmitt input : 0 .5vcce/0.35vcce is selected vt+/vt- 0 0.25vcce v : 0.7vcce/0.35vcce vt+/vt- 0 0.4vcce v : 0.7vcce/0.5vcce 21.2 electrical characteristics when vcce = 5 v, f(xin) = 10 mhz 21.2.1 recommended operating conditions (when vcce = 5 v, f(xin) = 10 mhz) recommended operating conditions (referenced to vcce, vdde = 5 v 0.5 v, ta = ?40c to 85c unless otherwise noted) 21.2 electrical characteristics when vcce = 5 v, f(xin) = 10 mhz
21 21-4 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit min typ max vil input low fp, mod0, 1, jtms, jtrst, jtdi, reset# 0 0.2vcce v voltage standard input for the following pins: 0 0.25vcce v rtdclk, rtdrxd, sclki0, 1, rxd0?3, tclk0?3, tin0, 3, 16?23, crx0, 1 standard input for the following pins: db0?15, wait# 0 0.16vcce v standard input for the following pins: sbi#, hreq# 0 0.25vcce v ioh(peak) high state peak output current p0?p22 (note 2) -10 ma ioh(avg) high state average output current p0?p22 (note 3) -5 ma iol(peak) low state peak output current p0?p22 (note 2) 10 ma iol(avg) low state average output current p0?p22 (note 3) 5 ma cl output load jtdo, jtms 80 pf capacitance other than above 15 50 pf f(xin) external clock input frequency 5 10 mhz note 1: subject to conditions vcce 21.2 electrical characteristics when vcce = 5 v, f(xin) = 10 mhz
21 21-5 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter test condition rated value unit min typ max icce vcce power supply current when operating f(xin)=10.0mhz 90 ma idde vdde power supply current when operating f(xin)=10.0mhz 1 ma iavcc avcc power supply current when operating f(xin)=10.0mhz 3 ma ivref vref power supply current when operating f(xin)=10.0mhz 1 ma symbol parameter test condition rated value unit min typ max voh output high voltage ioh 21.2.2 d.c. characteristics (when vcce = 5 v, f(xin) = 10 mhz) electrical characteristics (referenced to vcce, vdde = 5 v 0.5 v, ta = ?40c to 85c unless otherwise noted) electrical characteristics of each power supply pin 21.2 electrical characteristics when vcce = 5 v, f(xin) = 10 mhz
21 21-6 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter test condition rated value unit min typ max ? resolution vref=vcce=avcc 10 bits ? absolute without sample- slow mode normal speed 2 lsb accuracy and-hold or double speed 2 (note 1) during normal fast mode normal speed 3 sample-and-hold double speed 3 during fast slow mode normal speed 3 sample-and double speed 3 -hold fast mode normal speed 3 double speed 8 tconv conversion without sample- slow mode normal speed 14.95 s time and-hold or double speed 8.65 during normal fast mode normal speed 6.55 sample-and-hold double speed 4.45 during fast slow mode normal speed 9.55 sample-and double speed 5.05 -hold fast mode normal speed 4.75 double speed 2.65 iian analog input leakage current (note 2) avss 21.2.3 a-d conversion characteristics (when vcce = 5 v, f(xin) = 10 mhz) a-d conversion characteristics (referenced to vcce, vdde = 5.12 v, ta = ?40c to 85c unless otherwise noted) 21.2 electrical characteristics when vcce = 5 v, f(xin) = 10 mhz
21 21-7 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit min typ max vcce main power supply (note 1) 4.5 5.0 5.5 v vdde ram power supply (note 1) 4.5 5.0 5.5 v avcc analog power supply (note 1) 4.5 5.0 5.5 v vref reference voltage input (note 1) 4.5 5.0 5.5 v vih input high when when threshold selection 0.45vcce vcce v voltage threshold cmos input : 0.35vcce switching is selected threshold selection 0.6vcce vcce v function is : 0.5vcce used threshold selection 0.8vcce vcce v : 0.7vcce when vt+/vt- 0.6vcce vcce v schmitt input : 0.5vcce/0. 35vcce is selected vt+/vt- 0.8vcce vcce v : 0.7vcce/0.35vcce vt+/vt- 0.8vcce vcce v : 0.7vcce/0.5vcce fp, mod0, 1, jtms, jtrst, jtdi, reset# 0.8vcce vcce v standard input for the following pins: 0.8vcce vcce v rtdclk, rtdrxd, sclki0, 1, rxd0?3, tclk0?3, tin0, 3, 16?23, crx0, 1 standard input for the following pins: db0?15, wait# 0.43vcce vcce v standard input for the following pins: sbi#, hreq# 0.6vcce vcce v vil input low when when threshold selection 0 0.25vcce v voltage threshold cmos input : 0.35vcce switching is selected threshold selection 0 0.4vcce v function : 0.5vcce is used threshold selection 0 0.6vcce v : 0.7vcce when vt+/vt- 0 0.25vcce v schmitt input : 0.5vcce/0. 35vcce is selected vt+/vt- 0 0.25vcce v : 0.7vcce/0.35vcce vt+/vt- 0 0.4vcce v : 0.7vcce/0.5vcce 21.3 electrical characteristics when vcce = 5 v, f(xin) = 8 mhz 21.3.1 recommended operating conditions (when vcce = 5 v, f(xin) = 8 mhz) recommended operating conditions (referenced to vcce, vdde = 5 v 0.5 v, ta = ?40c to 125c unless otherwise noted) 21.3 electrical characteristics when vcce = 5 v, f(xin) = 8 mhz
21 21-8 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit min typ max vil input low fp, mod0, 1, jtms, jtrst, jtdi, reset# 0 0.2vcce v voltage standard input for the following pins: 0 0.25vcce v rtdclk, rtdrxd, sclki0, 1, rxd0?3, tclk0?3, tin0, 3, 16?23, crx0, 1 standard input for the following pins: db0?15, wait# 0 0.16vcce v standard input for the following pins: sbi#, hreq# 0 0.25vcce v ioh(peak) high state peak output current p0?p22 (note 2) -10 ma ioh(avg) high state average output current p0?p22 (note 3) -5 ma iol(peak) low state peak output current p0?p22 (note 2) 10 ma iol(avg) low state average output current p0?p22 (note 3) 5 ma cl output load jtdo, jtms 80 pf capacitance other than above 15 50 pf f(xin) external clock input frequency 5 8 mhz note 1: subject to conditions vcce 21.3 electrical characteristics when vcce = 5 v, f(xin) = 8 mhz
21 21-9 electrical characteristics 32176 group user?s manual (rev.1.01) electrical characteristics of each power supply pin symbol parameter test condition rated value unit min typ max voh output high voltage ioh 21.3.2 d.c. characteristics (when vcce = 5 v, f(xin) = 8 mhz) electrical characteristics (referenced to vcce, vdde = 5 v 0.5 v, ta = ?40c to 125c unless otherwise noted) symbol parameter test condition rated value unit min typ max icce vcce power supply current when operating f(xin)=8.0mhz 70 ma idde vdde power supply current when operating f(xin)=8.0mhz 1 ma iavcc avcc power supply current when operating f(xin)=8.0mhz 3 ma ivref vref power supply current when operating f(xin)=8.0mhz 1 ma 21.3 electrical characteristics when vcce = 5 v, f(xin) = 8 mhz
21 21-10 electrical characteristics 32176 group user?s manual (rev.1.01) 21.3.3 a-d conversion characteristics (when vcce = 5 v, f(xin) = 8 mhz) a-d conversion characteristics (referenced to vcce, vdde = 5.12 v, ta = ?40c to 125c unless other- wise noted) symbol parameter test condition rated value unit min typ max ? resolution vref=vcce=avcc 10 bits ? absolute without sample- slow mode normal speed 2 lsb accuracy and-hold or double speed 2 (note 1) during normal fast mode normal speed 3 sample-and-hold double speed 3 during fast slow mode normal speed 3 sample-and double speed 3 -hold fast mode normal speed 3 double speed 8 tconv conversion without sample- slow mode normal speed 18.6875 s time and-hold or double speed 10.8125 during normal fast mode normal speed 8.1875 sample-and-hold double speed 5.5625 during fast slow mode normal speed 11.9375 sample-and double speed 6.3125 -hold fast mode normal speed 5.9375 double speed 3.3125 iian analog input leakage current (note 2) avss 21.3 electrical characteristics when vcce = 5 v, f(xin) = 8 mhz
21 21-11 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit min typ max vcce main po wer supply (note 1) 3.0 3.3 3.6 v vdde ram power supply (note 1) 3.0 vcce 3.6 v avcc analog power supply (note 1) 3.0 vcce 3.6 v vref reference voltage input (note 1) 3.0 vcce 3.6 v vih input high when when threshold selection 0.5vcce vcce v voltage threshold cmos input : 0.35vcce switching is selected threshold selection 0.65vcce vcce v function is : 0.5vcce used threshold selection 0.8vcce vcce v : 0.7vcce when vt+/vt- 0.65vcce vcce v schmitt input : 0.5vcce/0.35vcce is selected vt+/vt- 0.8vcce vcce v : 0.7vcce/0.35vcce vt+/vt- 0.8vcce vcce v : 0.7vcce/0.5vcce fp, mod0, 1, jtms, jtrst, jtdi, reset# 0.8vcce vcce v standard input for the following pins: 0.8vcce vcce v rtdclk, rtdrxd, sclki0, 1, rxd0?3, tclk0?3, tin0, 3, 16?23, crx0, 1 standard input for the following pins: db0?15, wait# 0.5vcce vcce v standard input for the following pins: sbi#, hreq# 0.65vcce vcce v vil input low when when threshold selection 0 0.2vcce v voltage threshold cmos input : 0.35vcce switching is selected threshold selection 0 0.35vcce v function : 0.5vcce is used threshold selection 0 0.5vcce v : 0.7vcce when vt+/vt- 0 0.2vcce v schmitt input : 0.5vcce/0.35vcce is selected vt+/vt- 0 0.2vcce v : 0.7vcce/0.35vcce vt+/vt- 0 0.35vcce v : 0.7vcce/0.5vcce 21.4 electrical characteristics when vcce = 3.3 v, f(xin) = 10 mhz 21.4.1 recommended operating conditions (when vcce = 3.3 v 0.3 v, f(xin) = 10 mhz) recommended operating conditions (referenced to vcce, vdde = 3.3 v 0.3 v, ta = ?40c to 85c unless otherwise noted) 21.4 electrical characteristics when vcce = 3.3 v, f(xin) = 10 mhz
21 21-12 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit min typ max vil input low fp, mod0, 1, jtms, jtrst, jtdi, reset# 0 0.2vcce v voltage standard input for the following pins: 0 0.2vcce v rtdclk, rtdrxd, sclki0, 1, rxd0?3, tclk0?3, tin0, 1, 16?23, crx0, 1 standard input for the following pins: db0?15, wait# 0 0.2vcce v standard input for the following pins: sbi#, hreq# 0 0.2vcce v ioh(peak) high state peak output current p0?p22 (note 2) -10 ma ioh(avg) high state average output current p0?p22 (note 3) -5 ma iol(peak) low state peak output current p0?p22 (note 2) 10 ma iol(avg) low state average output current p0?p22 (note 3) 5 ma cl output load jtdo, jtms 80 pf capacitance other than above 15 50 pf f(xin) external clock input frequency 5 10 mhz note 1: subject to conditions vcce 21.4 electrical characteristics when vcce = 3.3 v, f(xin) = 10 mhz
21 21-13 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter test condition rated value unit min typ max icce vcce power supply current when operating f(xin)=10.0mhz 90 ma idde vdde power supply current when operating f(xin)=10.0mhz 1 ma iavcc avcc power supply current when operating f(xin)=10.0mhz 2 ma ivref vref power supply current when operating f(xin)=10.0mhz 1 ma symbol parameter test condition rated value unit min typ max voh output high voltage ioh 21.4.2 d.c. characteristics (when vcce = 3.3 v 0.3 v, f(xin) = 10 mhz) electrical characteristics (referenced to vcce, vdde = 3.3 v 0.3 v, ta = ?40c to 85c unless otherwise noted) electrical characteristics of each power supply pin 21.4 electrical characteristics when vcce = 3.3 v, f(xin) = 10 mhz
21 21-14 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter test condition rated value unit min typ max ? resolution vref=vcce=avcc 10 bits ? absolute without sample- slow mode normal speed 4 lsb accuracy and-hold or double speed 4 (note 1) during normal fast mode normal speed 6 sample-and-hold double speed 6 during fast slow mode normal speed 4 sample-and double speed 4 -hold fast mode normal speed 6 double speed 16 tconv conversion without sample- slow mode normal speed 14.95 s time and-hold or double spe ed 8.65 during normal fast mode normal speed 6.55 sample-and-hold double spe ed 4.45 during fast slow mode normal speed 9.55 sample-and double spe ed 5.05 -hold fast mode normal speed 4.75 double spe ed 2.65 iian analog input leakage current (note 2) avss 21.4.3 a-d conversion characteristics (when vcce = 3.3 v 0.3 v, f(xin) = 10 mhz) a-d conversion characteristics (referenced to vcce, vdde = 3.3 v, ta = ?40c to 85c unless otherwise noted) 21.4 electrical characteristics when vcce = 3.3 v, f(xin) = 10 mhz
21 21-15 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit min typ max vcce main po wer supply (note 1) 3.0 3.3 3.6 v vdde ram power supply (note 1) 3.0 vcce 3.6 v avcc analog power supply (note 1) 3.0 vcce 3.6 v vref reference voltage input (note 1) 3.0 vcce 3.6 v vih input high when when threshold selection 0.5vcce vcce v voltage threshold cmos input : 0.35vcce switching is selected threshold selection 0.65vcce vcce v function is : 0.5vcce used threshold selection 0.8vcce vcce v : 0.7vcce when vt+/vt- 0.65vcce vcce v schmitt input : 0.5vcc e/0.35vcce is selected vt+/vt- 0.8vcce vcce v : 0.7vcce/0.35vcce vt+/vt- 0.8vcce vcce v : 0.7vcce/0.5vcce fp, mod0, 1, jtms, jtrst, jtdi, reset# 0.8vcce vcce v standard input for the following pins: 0.8vcce vcce v rtdclk, rtdrxd, sclki0, 1, rxd0?3, tclk0?3, tin0, 3, 16?23, crx0, 1 standard input for the following pins: db0?15, wait# 0.5vcce vcce v standard input for the following pins: sbi#, hreq# 0.65vcce vcce v vil input low when when threshold selection 0 0.2vcce v voltage threshold cmos input : 0.35vcce switching is selected threshold selection 0 0.35vcce v function : 0.5vcce is used threshold selection 0 0.5vcce v : 0.7vcce when vt+/vt- 0 0.2vcce v schmitt input : 0.5vcc e/0.35vcce is selected vt+/vt- 0 0.2vcce v : 0.7vcce/0.35vcce vt+/vt- 0 0.35vcce v : 0.7vcce/0.5vcce 21.5 electrical characteristics when vcce = 3.3 v, f(xin) = 8 mhz 21.5.1 recommended operating conditions (when vcce = 3.3 v 0.3 v f(xin) = 8 mhz) recommended operating conditions (referenced to vcce, vdde = 3.3 v 0.3 v, ta = ?40c to 125c unless otherwise noted) 21.5 electrical characteristics when vcce = 3.3 v, f(xin) = 8 mhz
21 21-16 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit min typ max vil input low fp, mod0, 1, jtms, jtrst, jtdi, reset# 0 0.2vcce v voltage standard input for the following pins: 0 0.2vcce v rtdclk, rtdrxd, sclki0, 1, rxd0?3, tclk0?3, tin0, 3, 16?23, crx0, 1 standard input for the following pins: db0?15, wait# 0 0.2vcce v standard input for the following pins: sbi#, hreq# 0 0.2vcce v ioh(peak) high state peak output current p0?p22 (note 2) -10 ma ioh(avg) high state average output current p0?p22 (note 3) -5 ma iol(peak) low state peak output current p0?p22 (note 2) 10 ma iol(avg) low state average output current p0?p22 (note 3) 5 ma cl output load jtdo, jtms 80 pf capacitance other than above 15 50 pf f(xin) external clock input frequency 5 8 mhz note 1: subject to conditions vcce 21.5 electrical characteristics when vcce = 3.3 v, f(xin) = 8 mhz
21 21-17 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter test condition rated value unit min typ max icce vcce power supply current when operating f(xin)=8.0mhz 70 ma idde vdde power supply current when operating f(xin)=8.0mhz 1 ma iavcc avcc power supply current when operating f(xin)=8.0mhz 2 ma ivref vref power supply current when operating f(xin)=8.0mhz 1 ma symbol parameter test condition rated value unit min typ max voh output high voltage ioh 21.5.2 d.c. characteristics (when vcce = 3.3 v 0.3 v, f(xin) = 8 mhz) electrical characteristics (referenced to vcce, vdde = 3.3 v 0.3 v, ta = ?40c to 125c unless otherwise noted) electrical characteristics of each power supply pin 21.5 electrical characteristics when vcce = 3.3 v, f(xin) = 8 mhz
21 21-18 electrical characteristics 32176 group user?s manual (rev.1.01) 21.5.3 a-d conversion characteristics (when vcce = 3.3 v 0.3 v, f(xin) = 8 mhz) a-d conversion characteristics (referenced to vcce, vdde = 3.3 v, ta = ?40c to 125c unless otherwise noted) symbol parameter test condition rated value unit min typ max ? resolution vref=vcce=avcc 10 bits ? absolute without sample- slow mode normal speed 4 lsb accuracy and-hold or double speed 4 (note 1) during normal fast mode normal speed 6 sample-and-hold double speed 6 during fast slow mode normal speed 4 sample-and double speed 4 -hold fast mode normal speed 6 double speed 16 tconv conversion without sample- slow mode normal speed 18.6875 s time and-hold or double speed 10.8125 during normal fast mode normal speed 8.1875 sample-and-hold double speed 5.5625 during fast slow mode normal speed 11.9375 sample-and double speed 6.3125 -hold fast mode normal speed 5.9375 double speed 3.3125 iian analog input leakage current (note 2) avss 21.5 electrical characteristics when vcce = 3.3 v, f(xin) = 8 mhz
21 21-19 electrical characteristics 32176 group user?s manual (rev.1.01) 21.6 flash memory related characteristics symbol parameter test condition rated value unit min typ max topr flash rewrite ambient temperature t version -40 85 c v version -40 125 c cycle flash rewrite standard product 100 times durability (note 1) 10000 (10k) 4-kbyte block (note 3) 10000 times rewritable (block 1, 2) (10k) times product (note 2) other than 4-kbyte block 1000 (1k) times vcce vcce power supply voltage within the range of recom- 3.0 3.3 3.6 v (when reprogramming) mended power supply voltage 4.5 5.0 5.5 icce vcce power supply current (when programming) when using boot program 90 ma icce vcce power supply current (when erasing) when using boot program 90 ma 21.6 flash memory related characteristics note 1: the rewrite durability indicates the number of erase times for each block. note that more than one write operations (overwrite) on the same address cannot be performed. in that case, erase the old data before writing new. note 2: the 10000 (10k) times rewritable product is offered as an optional item. for details about it, please contact your nearest office of renesas or its distributor. please note that the standard product will be shipped if not consulted. note 3: block 1: h'0000 2000 to h'0000 2fff block 2: h'0000 3000 to h'0000 3fff note 4: do not rewrite within the voltage range from 3.6v to 4.5v. (1) standard product (flash rewrite durability: 100 times) symbol parameter test condition rated value unit min typ max tprg program time (note 1) all blocks up to 100 times 25 200 s tbers block erase time 4-kbyte block up to 100 times 0.3 6 s 8-kbyte block up to 100 times 0.3 6 s 32-kbyte block up to 100 times 0.5 6 s 64-kbyte block up to 100 times 0.8 6 s (2) 10000 (10k) times rewritable product (note 1) symbol parameter test condition rated value unit min typ max tprg program time (note 2) all blocks up to 1000 (1k) times 25 200 s 4-kbyte block up to 10000 (10k) times 600 s tbers block erase time 4-kbyte block up to 1000 (1k) times 0.3 6 s up to 10000 (10k) times 8 s 8-kbyte block up to 1000 (1k) times 0.3 6 s 32-kbyte block up to 1000 (1k) times 0.5 6 s 64-kbyte block up to 1000 (1k) times 0.8 6 s note 1: the 10000 (10k) times rewritable product is offered as an optional item. for details about it, please contact your nearest office of renesas or its distributor. please note that the standard product will be shipped if not consulted. note 2: it indicates a write time per halfword. note 1: it indicates a write time per halfword.
21 21-20 electrical characteristics 32176 group user?s manual (rev.1.01) 21.8 a.c. characteristics (when vcce = 5 v) ? the timing conditions are referenced to vcce, vdde = 5 v 0.5 v, ta = ?40c to 125c unless otherwise noted. ? the rated values below are guaranteed for the case where the output load capacitance of the measured pins are 15 pf to 50 pf (for jtag related values, a concentrated capacitance of 80 pf). 21.8.1 timing requirements (1) input/output ports symbol parameter rated value unit see fig. min max 21.8.1 tsu(p-e) port input setup time 100 n s [1] th(e-p) port input hold time 0 ns [2] (2) serial i/o a) csio mode, with internal clock selected symbol parameter rated value unit see fig. min max 21.8.2 tsu(d-clk) rxd input setup time 150 n s [4] th(clk-d) rxd input hold time 50 ns [5] b) csio mode, with external clock selected symbol parameter rated value unit see fig. min max 21.8.2 tc(clk) clk input cycle time 640 ns [7] tw(clkh) clk input high pulse width 300 ns [8] tw(clkl) clk input low pulse width 300 ns [9] tsu(d-clk) rxd input setup time 60 n s [10] th(clk-d) rxd input hold time 100 ns [11] 21.7 external capacitance for power supply 21.7 external capacitance for power supply symbol parameter rated value unit min typ max excvcc external capacitance connecting pin 1 10 f excvdd external capacitance connecting pin for the internal 1 10 f power supply of the built in ram excosc-vcc external capacitance connecting pin for the internal 1 10 f power supply of the clock
21 21-21 electrical characteristics 32176 group user?s manual (rev.1.01) (4) tin symbol parameter rated value unit see fig. min max 21.8.5 tw(tin) tin input pulse width 7 (3) sbi symbol parameter rated value unit see fig. min max 21.8.3 tw(sbil) sbi# input pulse width 5 21.8 a.c. characteristics (when vcce = 5 v) (5) tclk symbol parameter rated value unit see fig. min max 21.8.6 tw(tclkh) tclk input high pulse width 7
21 21-22 electrical characteristics 32176 group user?s manual (rev.1.01) (7) bus arbitration timing symbol parameter rated value unit see fig. min max 21.8.12 tsu(hreql-bclkh) hreq# input setup time before bclk 27 ns [35] th(bclkh-hreql) hreq# input hold time after bclk 0 ns [36] 21.8 a.c. characteristics (when vcce = 5 v) symbol parameter rated value unit see figs. 21.8.7 21.8.8 21.8.9 min max 21.8.10 21.8.11 tsu(d-bclkh) data input setup time before bclk 26 ns [31] th(bclkh-d) data input hold time after bclk 0 ns [32] tsu(waitl-bclkh) wait# input setup time before bclk 26 n s [33] th(bclkh-waitl) wait# input hold time after bclk 0 n s [34] tsu(waith-bclkh) wait# input setup time before bclk 26 n s [78] th(bclkh-waith) wait# input hold time after bclk 0 n s [79] tw(rdl) read low pulse width 3 (6) read and write timing tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2
21 21-23 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit see fig. min max 21.8.15 tc(rtdclk) rtdclk input cycle time 500 n s [90] tw(rtdclkh) rtdclk input high pulse width 230 ns [83] tw(rtdclkl) rtdclk input low pulse width 230 ns [84] td(rtdclkh-rtdack) rtdack delay time after rtdclk input 160 n s [85] tv(rtdclkl-rtdack) rtdack valid time after rtdclk input 160 n s [86] td(rtdclkh-rtdtxd) rtdtxd delay time after rtdclk input tw(rtdclkh)+160 n s [87] th(rtdclkh-rtdrxd) rtdrxd input hold time 50 ns [88] tsu(rtdrxd-rtd clkl) rtdrxd input setup time 60 n s [89] (9) jtag interface timing symbol parameter rated value unit see fig. min max 21.8.14 tc(jtck) jtck input cycle time 100 n s [60] tw(jtckh) jtck input high pulse width 40 ns [61] tw(jtckl) jtck input low pulse width 40 ns [62] tsu(jtdi-jtck) jtdi, jtms input setup time 15 n s [63] th(jtck-jtdi) jtdi, jtms input hold time 20 n s [64] td(jtck-jtdov) jtdo output delay time after jtck fall 40 n s [65] td(jtck-jtdox) jtdo output hi-z delay time after jtck fall 40 n s [66] tw(jtrst) jtrst input low pulse width tc(jtck) n s [67] note: ? the rated values here are guaranteed for the case where the measured pin load capacitance cl = 80 pf. (10) rtd timing symbol parameter rated value unit see fig. min max 21.8.13 tr high-going other than jtrst pin 10 n s [58] transition time (jtck, jtdi, jtms, jtdo) of input jtrst pin when using tap 10 n s when not using tap 2 m s tf low-going other than jtrst pin 10 n s [59] transition time (jtck, jtdi, jtms, jtdo) of input jtrst pin when using tap 10 n s when not using tap 2 m s (8) input transition time of jtag pins note: ? the rated values here are guaranteed for the case where the measured pin load capacitance cl = 80 pf. 21.8 a.c. characteristics (when vcce = 5 v)
21 21-24 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit see fig. min max 21.8.2 td(clk-d) txd output delay time 160 n s [12] 21.8.2 switching characteristics (1) input/output ports (2) serial i/o a) csio mode, with internal clock selected symbol parameter rated value unit see fig. min max 21.8.1 td(e-p) port data output delay time 100 n s [3] symbol parameter rated value unit see fig. min max 21.8.2 td(clk-d) txd output delay time 60 n s [6] th(clk-d) txd hold time 0 ns [82] b) csio mode, with external clock selected symbol parameter rated value unit see fig. min max 21.8.4 td(bclk-to) to output delay time 100 n s [15] (3)to 21.8 a.c. characteristics (when vcce = 5 v)
21 21-25 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit see figs. 21.8.7 21.8.8 min max 21.8.9 21.8.10 tc(bclk) bclk output cycle time n s [16] tw(bclkh) bclk output high pulse width -5 ns [17] tw(bclkl) bclk output low pulse width -5 ns [18] td(bclkh-a) address delay time after bclk 24 ns [19] td(bclkh-cs) chip select delay time after bclk 24 ns [20] tv(bclkh-a) address valid time after bclk -11 ns [21] tv(bclkh-cs) chip select valid time after bclk -11 ns [22] td(bclkl-rdl) read delay time after bclk 10 ns [23] tv(bclkh-rdl) read valid time after bclk -12 ns [24] td(bclkl-blwl) write delay time after bclk 11 n s [25] td(bclkl-bhwl) tv(bclkl-blwl) write valid time after bclk -12 n s [26] tv(bclkl-bhwl) td(bclkl-d) data output delay time after bclk 18 n s [27] tv(bclkh-d) data output valid time after bclk -16 n s [28] tpzx(bclkl-dz) data output enable time after bclk -19 n s [29] tpxz(bclkh-dz) data output disable time after bclk 5 n s [30] td(a-rdl) address delay time before read (4) read and write timing tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(xin) 2 tc(bclk) 2 tc(bclk) 2 21.8 a.c. characteristics (when vcce = 5 v) tc(bclk) 2 tc(bclk) 2 tc(bclk) 2
21 21-26 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit see figs. min max 21.8.9 21.8.10 21.8.11 td(blwl-d) data output delay time after write 15 n s [52] td(bhwl-d) (byte write mode) tv(blwh-d) data output valid time after write -13 n s [53] tv(bhwh-d) (byte write mode) tpxz(blwh-dz) data output disable time after write +5 n s [54] tpxz(bhwh-dz) (byte write mode) td(a-wrl) address delay time before write -15 ns [69] (byte enable mode) td(cs-wrl) c hip select delay time before write -15 n s [70] (byte enable mode) tv(wrh-a) address valid time after write -15 ns [71] (byte enable mode) tv(wrh-cs) chip select valid time after write -15 n s [72] (byte enable mode) td(ble-wrl) byte enable delay time before write -15 n s [73] td(bhe-wrl) (byte enable mode) tv(wrh-ble) byte enable valid time after write -15 n s [74] tv(wrh-bhe) (byte enable mode) td(wrl-d) data output delay time after write 15 n s [75] (byte enable mode) tv(wrh-d) data output valid time after write -13 n s [76] (byte enable mode) tpxz(wrh-dz) data output disable time after write +5 n s [77] (byte enable mode) tw(rdh) read high pulse width -3 ns [55] read and write timing (continued from the preceding page) (5) bus arbitration symbol parameter rated value unit see fig. min max 21.8.12 td(bclkl-hackl) hack# delay time after bclk 29 n s [37] tv(bclkl-hackl) hack# valid time after bclk -11 n s [38] tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 21.8 a.c. characteristics (when vcce = 5 v) tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2
21 21-27 electrical characteristics 32176 group user?s manual (rev.1.01) 21.8.3 a.c. characteristics figure 21.8.1 input/output port timing figure 21.8.2 serial i/o timing bclk port input port output 0.2vcce [1] tsu(p-e) [2] th(e-p) 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce [3] td(e-p) 0.8vcce sclko txd rxd [6] td(clk-d) [4] tsu(d-clk) [5] th(clk-d) a) csio mode, with internal clock selected 0.8vcce 0.2vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce b) csio mode, with external clock selected sclki txd rxd [12] td(clk-d) [10] tsu(d-clk) [11] th(clk-d) [7] tc(clk) [8] tw(clkh) [9] tw(clkl) [82] th(clk-d) 0.2vcce 0.8vcce 0.8vcce 0.2vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 21.8 a.c. characteristics (when vcce = 5 v)
21 21-28 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.8.3 sbi timing figure 21.8.5 tin timing figure 21.8.4 to timing sbi# [13] tw(sbil) 0.2vcce 0.2vcce bclk to [15] td(bclk-to) 0.8vcce 0.2vcce 0.2vcce tin [14] tw(tin) 0.2vcce 0.8vcce 0.2vcce 0.8vcce 21.8 a.c. characteristics (when vcce = 5 v) figure 21.8.6 tclk timing tclk [99] tw(tclkh) [100] tw(tclkl) 0.8vcce 0.2vcce
21 21-29 electrical characteristics 32176 group user?s manual (rev.1.01) notes: ? for signal-to-signal timing, see figure 21.8.9, "read timing (relative to read pulse)," and figure 21.8.10, "write timing (relative to write pulse)."  when using the threshold switching function, the data input and wait# voltage levels are determined with respect to the rated minimum and maximum values for vih and vil. bclk [16] tc(bclk) data output (db0?db15) address (a12?a30) blw# bhw# cs# (access area) wait# 0.43vcce 0.16vcce [19] td(bclkh-a) 0.43vcce [17] tw(bclkh) [21] tv(bclkh-a) [18] tw(bclkl) [20] td(bclkh-cs) [22] tv(bclkh-cs) [22] tv(bclkh-cs) [24] tv(bclkh-rdl) 0.16vcce [23] td(bclkl-rdl) [20] td(bclkh-cs) 0.43vcce 0.16vcce [32] th(bclkh-d) [31] tsu(d-bclkh) [26] tv(bclkl-blwl) tv(bclkl-bhwl) [28] tv(bclkh-d) [30] tpxz(bclkh-dz) [29] tpzx(bclkl-dz) [27] td(bclkl-d) [33] tsu(waitl-bclkh) [34] th(bclkh-waitl) [79] th(bclkh-waith) [78] tsu(waith-bclkh) [25] td(bclkl-blwl) td(bclkl-bhwl) 0.16vcce 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.16vcce 0.43vcce cs# (non-access area) rd# data input (db0?db15) 0.16vcce 0.16vcce 0.16vcce 21.8 a.c. characteristics (when vcce = 5 v) figure 21.8.7 read and write timing (relative to bclk) with one or more external wait state(s)
21 21-30 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.8.8 read and write timing (relative to bclk) with one wait state bclk [16] tc(bclk) data output (db0?db15) address (a12?a30) cs0#, cs1# blw# bhw# 0.43vcce 0.16vcce 0.43vcce [17] tw(bclkh) [18] tw(bclkl) [24] tv(bclkh-rdl) [23] td(bclkl-rdl) 0.16vcce [32] th(bclkh-d) [31] tsu(d-bclkh) [26] tv(bclkl-blwl) tv(bclkl-bhwl) [28] tv(bclkh-d) [30] tpxz(bclkh-dz) [29] tpzx(bclkl-dz) [27] td(bclkl-d) [25] td(bclkl-blwl) td(bclkl-bhwl) 0.16vcce 0.43vcce 0.16vcce 0.43vcce 0.16vcce rd# data input (db0?db15) [20] td(bclkh-cs) [19] td(bclkh-a) [22] tv(bclkh-cs) [21] tv(bclkh-a) note:  when using the threshold switching function, the data input voltage levels are determined with respect to the rated minimum and maximum values for vih and vil. 0.16vcce 21.8 a.c. characteristics (when vcce = 5 v)
21 21-31 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.8.9 read timing (relative to read pulse) [55] tw(rdh) data output (db0?db15) address (a12?a30) blw# bhw# cs# (access area) 0.43vcce 0.16vcce 0.43vcce [43] tw(rdl) [39] td(a-rdl) [41] tv(rdh-a) [42] tv(rdh-cs) [42] tv(rdh-cs) 0.16vcce 0.43vcce 0.16vcce [40] td(cs-rdl) 0.16vcce [45] th(rdh-d) [44] tsu(d-rdh) 0.16vcce 0.43vcce cs# (non-access area) rd# data input (db0?db15) [57] td(blwh-rdl) td(bhwh-rdl) [56] td(rdh-blwl) td(rdh-bhwl) [46] tpzx(rdh-dz) 0.43vcce 0.43vcce 0.16vcce note:  when using the threshold switching function, the data input voltage levels are determined with respect to the rated minimum and maximum values for vih and vil. 21.8 a.c. characteristics (when vcce = 5 v)
21 21-32 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.8.10 write timing (relative to write pulse) address (a12?a30) blw# bhw# cs# (access area) 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.16vcce 0.16vcce 0.43vcce cs# (non-access area) rd# data output (db0?db15) [56] td(rdh-blwl) td(rdh-bhwl) [57] td(blwh-rdl) td(bhwh-rdl) 0.43vcce [51] tw(blwl) tw(bhwl) [47] td(a-blwl) td(a-bhwl) [49] tv(blwh-a) tv(bhwh-a) [50] tv(blwh-cs) tv(bhwh-cs) [48] td(cs-blwl) td(cs-bhwl) [50] tv(blwh-cs) tv(bhwh-cs) [52] td(blwl-d) td(bhwl-d) [53] tv(blwh-d) tv(bhwh-d) [54] tpxz(blwh-dz) tpxz(bhwh-dz) 21.8 a.c. characteristics (when vcce = 5 v)
21 21-33 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.8.11 write timing (byte enable mode) address (a12?a30) wr# cs# (access area) 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.16vcce 0.16vcce 0.43vcce cs# (non-access area) rd# data output (db0?db15) [81] td(wrh-rdl) 0.43vcce [68] tw(wrl) [77] tpxz(wrh-dz) ble# bhe# 0.16vcce [73] td(blel-wrl) td(bhel-wrl) [74] tv(wrh-blel) tv(wrh-bhel) [71] tv(wrh-a) [80] td(rdh-wrl) [69] td(a-wrl) [72] tv(wrh-cs) [72] tv(wrh-cs) [70] td(cs-wrl) [75] td(wrl-d) [76] tv(wrh-d) 21.8 a.c. characteristics (when vcce = 5 v)
21 21-34 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.8.12 bus arbitration timing bclk hack# [36] th(bclkh-hreql) [37] td(bclkl-hackl) [38] tv(bclkl-hackl) hreq# 0.16vcce 0.16vcce 0.16vcce [35] tsu(hreql-bclkh) 0.16vcce 0.43vcce 0.16vcce figure 21.8.13 input transition time of jtag pins jtck, jtdi jtms, jtrst [58] tr [59] tf note:  the rated values here are guaranteed for the case where the measured pin load capacitance cl = 80 pf. 0.2vcce 0.8vcce 0.2vcce 0.8vcce 21.8 a.c. characteristics (when vcce = 5 v)
21 21-35 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.8.15 rtd timing rtdclk rtdack rtdtxd rtdrxd [90] tc(rtdclk) 0.5vcce 0.5vcce 0.5vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.5vcce [83] tw(rtdclkh) [84] tw(rtdclkl) [85] td(rtdclkh-rtdack) [86] tv(rtdclkl-rtdack) [89] tsu(rtdrxd-rtdclkl) [87] td(rtdclkh-rtdtxd) [88] th(rtdclkh-rtdrxd) figure 21.8.14 jtag interface timing jtck 0.5vcce [60] tc(jtck) [67] tw(jtrst) data input (jtdi) jtms data output (jtdo) jtrst 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.2vcce 0.2vcce 0.8vcce 0.2vcce note:  the rated values here are guaranteed for the case where the measured pin load capacitance cl = 80 pf. [61] tw(jtckh) [62] tw(jtckl) [63] tsu(jtdi-jtck) [64] th(jtck-jtdi) [65] td(jtck-jtdov) [66] td(jtck-jtdox) 21.8 a.c. characteristics (when vcce = 5 v)
21 21-36 electrical characteristics 32176 group user?s manual (rev.1.01) 21.9 a.c. characteristics (when vcce = 3.3 v) ? the timing conditions are referenced to vcce, vdde = 3.3v 0.3 v, ta = ?40c to 125c unless otherwise noted. ? the rated values below are guaranteed for the case where the output load capacitance of the measured pins are 15 pf to 50 pf (for jtag related values, a concentrated capacitance of 80 pf). 21.9.1 timing requirements (1) input/output ports symbol parameter rated value unit see fig. min max 21.9.1 tsu(p-e) port input setup time 100 n s [1] th(e-p) port input hold time 0 ns [2] (2) serial i/o a) csio mode, with internal clock selected symbol parameter rated value unit see fig. min max 21.9.2 tsu(d-clk) rxd input setup time 150 n s [4] th(clk-d) rxd input hold time 50 ns [5] b) csio mode, with external clock selected symbol parameter rated value unit see fig. min max 21.9.2 tc(clk) clk input cycle time 640 ns [7] tw(clkh) clk input high pulse width 300 ns [8] tw(clkl) clk input low pulse width 300 ns [9] tsu(d-clk) rxd input setup time 60 n s [10] th(clk-d) rxd input hold time 100 ns [11] 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-37 electrical characteristics 32176 group user?s manual (rev.1.01) (4) tin symbol parameter rated value unit see fig. min max 21.9.5 tw(tin) tin input pulse width 7 (3) sbi symbol parameter rated value unit see fig. min max 21.9.3 tw(sbil) sbi# input pulse width 5 21.9 a.c. characteristics (when vcce = 3.3 v) (5) tclk symbol parameter rated value unit see fig. min max 21.9.6 tw(tclkh) tclk input high pulse width 7
21 21-38 electrical characteristics 32176 group user?s manual (rev.1.01) (7) bus arbitration timing symbol parameter rated value unit see fig. min max 21.9.12 tsu(hreql-bclkh) hreq# input setup time before bclk 27 ns [35] th(bclkh-hreql) hreq# input hold time after bclk 0 ns [36] 21.9 a.c. characteristics (when vcce = 3.3 v) symbol parameter rated value unit see figs. 21.9.7 21.9.8 21.9.9 min max 21.9.10 21.9.11 tsu(d-bclkh) data input setup time before bclk 26 ns [31] th(bclkh-d) data input hold time after bclk 0 ns [32] tsu(waitl-bclkh) wait# input setup time before bclk 26 n s [33] th(bclkh-waitl) wait# input hold time after bclk 0 n s [34] tsu(waith-bclkh) wait# input setup time before bclk 26 n s [78] th(bclkh-waith) wait# input hold time after bclk 0 n s [79] tw(rdl) read low pulse width 3x -23 n s [43] tsu(d-rdh) data input setup time before read 30 ns [44] th(rdh-d) data input hold time after read 0 ns [45] tw(blwl) write low pulse width -25 ns [51] tw(bhwl) (byte write mode) td(rdh-blwl) write delay time after read -10 n s [56] td(rdh-bhwl) td(blwh-rdl) read delay time after write -10 n s [57] td(bhwh-rdl) tw(wrl) write low pulse width tc(bclk) -25 n s [68] (byte enable mode) td(rdh-wrl) write delay time after read -10 n s [80] (byte enable mode) td(wrh-rdl) read delay time after write -10 n s [81] (byte enable mode) (6) read and write timing tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2
21 21-39 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit see fig. min max 21.9.15 tc(rtdclk) rtdclk input cycle time 500 n s [90] tw(rtdclkh) rtdclk input high pulse width 230 ns [83] tw(rtdclkl) rtdclk input low pulse width 230 ns [84] td(rtdclkh-rtdack) rtdack delay time after rtdclk input 160 n s [85] tv(rtdclkl-rtdack) rtdack valid time after rtdclk input 160 n s [86] td(rtdclkh-rtdtxd) rtdtxd delay time after rtdclk input tw(rtdclkh)+160 n s [87] th(rtdclkh-rtdrxd) rtdrxd input hold time 50 ns [88] tsu(rtdrxd-rtd clkl) rtdrxd input setup time 60 n s [89] (9) jtag interface timing symbol parameter rated value unit see fig. min max 21.9.14 tc(jtck) jtck input cycle time 100 n s [60] tw(jtckh) jtck input high pulse width 40 ns [61] tw(jtckl) jtck input low pulse width 40 ns [62] tsu(jtdi-jtck) jtdi, jtms input setup time 15 n s [63] th(jtck-jtdi) jtdi, jtms input hold time 20 n s [64] td(jtck-jtdov) jtdo output delay time after jtck fall 40 n s [65] td(jtck-jtdox) jtdo output hi-z delay time after jtck fall 40 n s [66] tw(jtrst) jtrst input low pulse width tc(jtck) n s [67] note: ? the rated values here are guaranteed for the case where the measured pin load capacitance cl = 80 pf. (10) rtd timing symbol parameter rated value unit see fig. min max 21.9.13 tr high-going other than jtrst pin 10 n s [58] transition time (jtck, jtdi, jtms, jtdo) of input jtrst pin when using tap 10 n s when not using tap 2 m s tf low-going other than jtrst pin 10 n s [59] transition time (jtck, jtdi, jtms, jtdo) of input jtrst pin when using tap 10 n s when not using tap 2 m s (8) input transition time of jtag pins note: ? the rated values here are guaranteed for the case where the measured pin load capacitance cl = 80 pf. 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-40 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit see fig. min max 21.9.2 td(clk-d) txd output delay time 160 n s [12] 21.9.2 switching characteristics (1) input/output ports (2) serial i/o a) csio mode, with internal clock selected symbol parameter rated value unit see fig. min max 21.9.1 td(e-p) port data output delay time 100 n s [3] symbol parameter rated value unit see fig. min max 21.9.2 td(clk-d) txd output delay time 60 n s [6] th(clk-d) txd hold time 0 ns [82] b) csio mode, with external clock selected symbol parameter rated value unit see fig. min max 21.9.4 td(bclk-to) to output delay time 100 n s [15] (3)to 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-41 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit see figs. 21.9.7 21.9.8 min max 21.9.9 21.9.10 tc(bclk) bclk output cycle time n s [16] tw(bclkh) bclk output high pulse width -5 ns [17] tw(bclkl) bclk output low pulse width -5 ns [18] td(bclkh-a) address delay time after bclk 29 ns [19] td(bclkh-cs) chip select delay time after bclk 30 ns [20] tv(bclkh-a) address valid time after bclk -11 ns [21] tv(bclkh-cs) chip select valid time after bclk -11 ns [22] td(bclkl-rdl) read delay time after bclk 14 ns [23] tv(bclkh-rdl) read valid time after bclk -12 ns [24] td(bclkl-blwl) write delay time after bclk 14 n s [25] td(bclkl-bhwl) tv(bclkl-blwl) write valid time after bclk -12 n s [26] tv(bclkl-bhwl) td(bclkl-d) data output delay time after bclk 18 n s [27] tv(bclkh-d) data output valid time after bclk -16 n s [28] tpzx(bclkl-dz) data output enable time after bclk -19 n s [29] tpxz(bclkh-dz) data output disable time after bclk 5 n s [30] td(a-rdl) address delay time before read -15 ns [39] td(cs-rdl) chip select delay time before read -15 n s [40] tv(rdh-a) address valid time after read 0 ns [41] tv(rdh-cs) chip select valid time after read 0 ns [42] tpzx(rdh-dz) data output enable time after read n s [46] td(a-blwl) address delay time before write -15 ns [47] td(a-bhwl) (byte write mode) td(cs-blwl) chip select delay time before write -15 n s [48] td(cs-bhwl) (byte write mode) tv(blwh-a) address valid time after write -15 ns [49] tv(bhwh-a) (byte write mode) tv(blwh-cs) chip select valid time after write -15 n s [50] tv(bhwh-cs) (byte write mode) (4) read and write timing tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(xin) 2 tc(bclk) 2 tc(bclk) 2 21.9 a.c. characteristics (when vcce = 3.3 v) tc(bclk) 2 tc(bclk) 2 tc(bclk) 2
21 21-42 electrical characteristics 32176 group user?s manual (rev.1.01) symbol parameter rated value unit see figs. min max 21.9.9 21.9.10 21.9.11 td(blwl-d) data output delay time after write 15 n s [52] td(bhwl-d) (byte write mode) tv(blwh-d) data output valid time after write -13 n s [53] tv(bhwh-d) (byte write mode) tpxz(blwh-dz) data output disable time after write +5 n s [54] tpxz(bhwh-dz) (byte write mode) td(a-wrl) address delay time before write -15 ns [69] (byte enable mode) td(cs-wrl) chip select delay time before write -15 n s [70] (byte enable mode) tv(wrh-a) address valid time after write -15 ns [71] (byte enable mode) tv(wrh-cs) chip select valid time after write -15 n s [72] (byte enable mode) td(ble-wrl) byte enable delay time before write -15 n s [73] td(bhe-wrl) (byte enable mode) tv(wrh-ble) byte enable valid time after write -15 n s [74] tv(wrh-bhe) (byte enable mode) td(wrl-d) data output delay time after write 15 n s [75] (byte enable mode) tv(wrh-d) data output valid time after write -13 n s [76] (byte enable mode) tpxz(wrh-dz) data output disable time after write +5 n s [77] (byte enable mode) tw(rdh) read high pulse width -3 ns [55] read and write timing (continued from the preceding page) (5) bus arbitration symbol parameter rated value unit see fig. min max 21.9.12 td(bclkl-hackl) hack# delay time after bclk 29 n s [37] tv(bclkl-hackl) hack# valid time after bclk -11 n s [38] tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 21.9 a.c. characteristics (when vcce = 3.3 v) tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2 tc(bclk) 2
21 21-43 electrical characteristics 32176 group user?s manual (rev.1.01) 21.9.3 a.c. characteristics figure 21.9.1 input/output port timing figure 21.9.2 serial i/o timing bclk port input port output 0.2vcce [1] tsu(p-e) [2] th(e-p) 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce [3] td(e-p) 0.8vcce sclko txd rxd [6] td(clk-d) [4] tsu(d-clk) [5] th(clk-d) a) csio mode, with internal clock selected 0.8vcce 0.2vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce b) csio mode, with external clock selected sclki txd rxd [12] td(clk-d) [10] tsu(d-clk) [11] th(clk-d) [7] tc(clk) [8] tw(clkh) [9] tw(clkl) [82] th(clk-d) 0.2vcce 0.8vcce 0.8vcce 0.2vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-44 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.9.3 sbi timing figure 21.9.5 tin timing figure 21.9.4 to timing sbi# [13] tw(sbil) 0.2vcce 0.2vcce bclk to [15] td(bclk-to) 0.8vcce 0.2vcce 0.2vcce tin [14] tw(tin) 0.2vcce 0.8vcce 0.2vcce 0.8vcce 21.9 a.c. characteristics (when vcce = 3.3 v) figure 21.9.6 tclk timing tclk [99] tw(tclkh) [100] tw(tclkl) 0.8vcce 0.2vcce
21 21-45 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.9.7 read and write timing (relative to bclk) with one or more external wait state(s) notes:  for signal-to-signal timing, see figure 21.9.9, "read timing (relative to read pulse)," and figure 21.9.10, "write timing (relative to write pulse)."  when using the threshold switching function, the data input and wait# voltage levels are determined with respect to the rated minimum and maximum values for vih and vil. bclk [16] tc(bclk) data output (db0?db15) address (a12?a30) blw# bhw# cs# (access area) wait# 0.43vcce 0.16vcce [19] td(bclkh-a) 0.43vcce [17] tw(bclkh) [21] tv(bclkh-a) [18] tw(bclkl) [20] td(bclkh-cs) [22] tv(bclkh-cs) [22] tv(bclkh-cs) [24] tv(bclkh-rdl) 0.16vcce [23] td(bclkl-rdl) [20] td(bclkh-cs) 0.43vcce 0.16vcce [32] th(bclkh-d) [31] tsu(d-bclkh) [26] tv(bclkl-blwl) tv(bclkl-bhwl) [28] tv(bclkh-d) [30] tpxz(bclkh-dz) [29] tpzx(bclkl-dz) [27] td(bclkl-d) [33] tsu(waitl-bclkh) [34] th(bclkh-waitl) [79] th(bclkh-waith) [78] tsu(waith-bclkh) [25] td(bclkl-blwl) td(bclkl-bhwl) 0.16vcce 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.16vcce 0.43vcce cs# (non-access area) rd# data input (db0?db15) 0.16vcce 0.16vcce 0.16vcce 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-46 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.9.8 read and write timing (relative to bclk) with one wait state bclk [16] tc(bclk) data output (db0?db15) address (a12?a30) cs0#, cs1# blw# bhw# 0.43vcce 0.16vcce 0.43vcce [17] tw(bclkh) [18] tw(bclkl) [24] tv(bclkh-rdl) [23] td(bclkl-rdl) 0.16vcce [32] th(bclkh-d) [31] tsu(d-bclkh) [26] tv(bclkl-blwl) tv(bclkl-bhwl) [28] tv(bclkh-d) [30] tpxz(bclkh-dz) [29] tpzx(bclkl-dz) [27] td(bclkl-d) [25] td(bclkl-blwl) td(bclkl-bhwl) 0.16vcce 0.43vcce 0.16vcce 0.43vcce 0.16vcce rd# data input (db0?db15) [20] td(bclkh-cs) [19] td(bclkh-a) [22] tv(bclkh-cs) [21] tv(bclkh-a) note:  when using the threshold switching function, the data input voltage levels are determined with respect to the rated minimum and maximum values for vih and vil. 0.16vcce 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-47 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.9.9 read timing (relative to read pulse) [55] tw(rdh) data output (db0?db15) address (a12?a30) blw# bhw# cs# (access area) 0.43vcce 0.16vcce 0.43vcce [43] tw(rdl) [39] td(a-rdl) [41] tv(rdh-a) [42] tv(rdh-cs) [42] tv(rdh-cs) 0.16vcce 0.43vcce 0.16vcce [40] td(cs-rdl) 0.16vcce [45] th(rdh-d) [44] tsu(d-rdh) 0.16vcce 0.43vcce cs# (non-access area) rd# data input (db0?db15) [57] td(blwh-rdl) td(bhwh-rdl) [56] td(rdh-blwl) td(rdh-bhwl) [46] tpzx(rdh-dz) 0.43vcce 0.43vcce 0.16vcce note:  when using the threshold switching function, the data input voltage levels are determined with respect to the rated minimum and maximum values for vih and vil. 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-48 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.9.10 write timing (relative to write pulse) address (a12?a30) blw# bhw# cs# (access area) 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.16vcce 0.16vcce 0.43vcce cs# (non-access area) rd# data output (db0?db15) [56] td(rdh-blwl) td(rdh-bhwl) [57] td(blwh-rdl) td(bhwh-rdl) 0.43vcce [51] tw(blwl) tw(bhwl) [47] td(a-blwl) td(a-bhwl) [49] tv(blwh-a) tv(bhwh-a) [50] tv(blwh-cs) tv(bhwh-cs) [48] td(cs-blwl) td(cs-bhwl) [50] tv(blwh-cs) tv(bhwh-cs) [52] td(blwl-d) td(bhwl-d) [53] tv(blwh-d) tv(bhwh-d) [54] tpxz(blwh-dz) tpxz(bhwh-dz) 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-49 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.9.11 write timing (byte enable mode) address (a12?a30) wr# cs# (access area) 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.43vcce 0.16vcce 0.16vcce 0.16vcce 0.43vcce cs# (non-access area) rd# data output (db0?db15) [81] td(wrh-rdl) 0.43vcce [68] tw(wrl) [77] tpxz(wrh-dz) ble# bhe# 0.16vcce [73] td(blel-wrl) td(bhel-wrl) [74] tv(wrh-blel) tv(wrh-bhel) [71] tv(wrh-a) [80] td(rdh-wrl) [69] td(a-wrl) [72] tv(wrh-cs) [72] tv(wrh-cs) [70] td(cs-wrl) [75] td(wrl-d) [76] tv(wrh-d) 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-50 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.9.12 bus arbitration timing bclk hack# [36] th(bclkh-hreql) [37] td(bclkl-hackl) [38] tv(bclkl-hackl) hreq# 0.16vcce 0.16vcce 0.16vcce [35] tsu(hreql-bclkh) 0.16vcce 0.43vcce 0.16vcce figure 21.9.13 input transition time of jtag pins jtck, jtdi jtms, jtrst [58] tr [59] tf note:  the rated values here are guaranteed for the case where the measured pin load capacitance cl = 80 pf. 0.2vcce 0.8vcce 0.2vcce 0.8vcce 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-51 electrical characteristics 32176 group user?s manual (rev.1.01) figure 21.9.15 rtd timing rtdclk rtdack rtdtxd rtdrxd [90] tc(rtdclk) 0.5vcce 0.5vcce 0.5vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.5vcce [83] tw(rtdclkh) [84] tw(rtdclkl) [85] td(rtdclkh-rtdack) [86] tv(rtdclkl-rtdack) [89] tsu(rtdrxd-rtdclkl) [87] td(rtdclkh-rtdtxd) [88] th(rtdclkh-rtdrxd) figure 21.9.14 jtag interface timing jtck 0.5vcce [60] tc(jtck) [67] tw(jtrst) data input (jtdi) jtms data output (jtdo) jtrst 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.8vcce 0.2vcce 0.2vcce 0.2vcce 0.8vcce 0.2vcce note:  the rated values here are guaranteed for the case where the measured pin load capacitance cl = 80 pf. [61] tw(jtckh) [62] tw(jtckl) [63] tsu(jtdi-jtck) [64] th(jtck-jtdi) [65] td(jtck-jtdov) [66] td(jtck-jtdox) 21.9 a.c. characteristics (when vcce = 3.3 v)
21 21-52 electrical characteristics 32176 group user?s manual (rev.1.01) this page is blank for reasons of layout. 21.9 a.c. characteristics (when vcce = 3.3 v)
chapter 22 typical characteristics
22 22-2 32176 group user?s manual (rev.1.01) typical characteristics to be written at a later time.
appendix 1 mechanical specificaitons appendix 1.1 dimensional outline drawing
appendix 1 appendix 1-2 mechanical specificaitons appendix 1.1 dimensional outline drawing 32176 group user?s manual (rev.1.01) appendix 1.1 dimensional outline drawing (1) 144-pin lqfp lqfp144-p-2020-0.50 weight(g) ? 1.23 jedec code eiaj package code lead material cu alloy 144p6q-a plastic 144pin 20 20mm body lqfp ? 0.125 ? ?? 0.2 ? ? ?? ? ? ? ? ? symbol min nom max a a 2 b c d e h e l l 1 y b 2 dimension in millimeters h d a 1 0.225 ? ? i 2 0.95 ? ? m d 20.4 ? ? m e 20.4 8o 0o 0.1 1.0 0.65 0.5 0.35 22.2 22.0 21.8 22.2 22.0 21.8 0.5 20.1 20.0 19.9 20.1 20.0 19.9 0.175 0.125 0.105 0.27 0.22 0.17 1.4 0.05 1.7 e a h d d h e e 1 36 37 72 73 108 109 144 f e lp 0.45 ? ? 0.6 0.25 ? 0.75 ? 0.08 x a3 m d l 2 b 2 m e e recommended mount pad y b x m a 1 a 2 l 1 l detail f lp a3 c mmp
appendix 2 instruction processing time appendix 2.1 m32r/ecu instruction processing time
appendix 2 appendix 2-2 32176 group user?s manual (rev.1.01) instruction processing time appendix 2.1 m32r/ecu instruction processing time appendix 2.1 m32r/ecu instruction processing time for microcomputers, the number of instruction execution cycles in the e stage normally represents their instruction processing time. however, depending on pipeline operation, other stages may affect the instruction processing time. especially when a branch instruction is executed, the processing time in each of the if (instruction fetch), d (decode) and e (execution) stages of the next instruction must be taken into account. the tables below show the instruction processing time in each pipelined stage of the m32r/ecu. appendix table 2.1.1 instruction processing time in each pipelined stage number of execution cycles in each stage instruction if d e mem wb load instructions (ld, ldb, ldub, ldh, lduh, lock) r 1 1 r 1 store instructions (st, stb, sth, unlock) r 1 1 w ? multiply instructions (mul) r 1 3 ? 1 divide/remainder instructions (div, divu, rem, remu) r 1 37 ? 1 other instructions (including dsp function instructions) r 1 1 ? 1 the following shows the number of memory access cycles in the if and mem stages. shown here are the minimum number of cycles required for memory access. therefore, these values do not always reflect the number of cycles actually required for memory or bus access. in write access, for example, although the cpu finishes the mem stage by only writing to the write buffer, this operation actually is followed by a write to memory. depending on the memory or bus state before or after the cpu requests a memory access, the instruction processing may take more time than the calculated value. r (read cycle) when existing in the instruction queue .................................................. 1 cpuclk cycle when reading the internal resource (rom, ram) ....................................1 cpuclk cycle when reading the internal resource (sfr) (byte or halfword) .................... 2 cpuclk cycles when reading the internal resource (sfr) (word) .................................... 4 cpuclk cycles when reading external memory (byte or halfword) ................................... 1 cpuclk + 2 bclk cycles (note 1) when reading external memory (word) .................................................... 1 cpuclk + 4 bclk cycles (note 1) when successively fetching instructions from external memory ............... 4 bclk cycles (note 1) w (write cycle) when writing to the internal resource (ram) .......................................... 1 cpuclk cycle when writing to the internal resource (sfr) (byte or halfword) .................. 2 cpuclk cycles when writing to the internal resource (sfr) (word) ................................. 4 cpuclk cycles when writing to external memory (byte or halfword) ................................ 2 bclk cycles (note 1) when writing to external memory (word) .................................................4 bclk cycles (note 1) note 1: this applies to the case where external access = one wait cycle. (when the m32r/ecu performs an external access, at least one wait cycle is inserted.) note:  bclk and cpuclk have the relationship 1 bclk = 2 cpuclk.
appendix 3 processing of unused pins appendix 3.1 example processing of unused pins
appendix 3 appendix 3-2 32176 group user?s manual (rev.1.01) processing of unused pins appendix 3.1 example processing of unused pins an example of how to process the unused pins of the microcomputer is shown below. (1) when operating in single-chip mode appendix table 3.1.1 example processing of unused pins during single-chip mode (note 1) appendix 3.1 example processing of unused pins pin name p00?p07, p10?p17, p20?p27, p30?p37, p41?p47, p61?p63, p70?p77, p82?p87, p93?p97, p100?p107, p110?p117, p124?p127, p130?p137, p150, p153, p174, p175, p220, p221, p225 processing set the port for input mode and pull each pin low to vss or pull high to vcce via a 1 k ? ?10 k ? resistor. or set the port for output mode and leave the pin open. xout (note 4) ad0in0?ad0in15, avref0, avss0 leave open connect to vcce avcc0 jtag jtdo, jtms, jtdi, jtck jtrst pull high to vcce or low to vss via a 0?100 k ? resistor pull low to vss via a 0?100 k ? resistor connect to vss a-d converter note 1: process the unused pins in the shortest wiring length possible (within 20 mm) from the microcomputer pins. note 2: if any port is set for output mode and left open, care should be taken because the port remains set for input before it is changed for output in a program after being reset. therefore, the voltage level at the pin is instable , and the power supply current tends to increase while the port remains set for input. because it is possible that the content of the port direction register will inadvertently be altered by noise or noise-induced runaway, higher reliability may be obtained by periodically setting the port direction register back again in a program. note, however, that p221 is input-only port and does not work as an output port. note 3: make sure that unintended falling edges due to noise, etc. will be not applied. (a falling edge at the sbi# input causes a system break interrupt to occur.) note 4: this is necessary when an external clock is connected to xin. sbi# (note 3) pull low to vss via a 1 k ? ?10 k ? resistor. input/output ports (note 2)
appendix 3 appendix 3-3 32176 group user?s manual (rev.1.01) processing of unused pins (2) when operating in external extension/processor mode appendix table 3.1.2 example processing of unused pins during external extension/processor mode (note 1) pin name p61?p63, p70?p77, p82?p87, p93?p97, p100?p107, p110?p117, p124?p127, p130?p137, p150, p153, p174, p175, p220, p221 processing xout (note 4) ad0in0?ad0in15, avref0, avss0 leave open connect to vcce avcc0 jtag jtdo, jtms, jtdi, jtck jtrst pull high to vcce or low to vss via a 0k ? ?100 k ? resistor pull low to vss via a 0?100 k ? resistor connect to vss a-d converter note 1: process the unused pins in the shortest wiring length possible (within 20 mm) from the microcomputer pins. note 2: if any port is set for output mode and left open, care should be taken because the port remains set for input before it is changed for output in a program after being reset. therefore, the voltage level at the pin is instable , and the power supply current tends to increase while the port remains set for input. because it is possible that the content of the port direction register will inadvertently be altered by noise or noise-induced runaway, higher reliability may be obtained by periodically setting the port direction register back again in a program. note, however, that p221 is input-only port and does not work as an output port. note 3: make sure that unintended falling edges due to noise, etc. will be not applied. (a falling edge at the sbi# input causes a system break interrupt to occur.) note 4: this is necessar y when an external clock is connected to xin. a12?a30, db0?db15, blw#/ble#, bhw#/bhe#, rd#, cs#0, cs#1 leave open sbi# (note 3) pull low to vss via a 1 k ? ?10 k ? resistor input/output ports (note 2) set the port for input mode and pull each pin low to vss or pull high to vcce via a 1 k ? ?10 k ? resistor. or set the port for output mode and leave the pin open. appendix 3.1 example processing of unused pins
appendix 3 appendix 3-4 32176 group user?s manual (rev.1.01) processing of unused pins appendix 3.1 example processing of unused pins this page is blank for reasons of layout.
appendix 4 summary of precautions appendix 4.1 precautions about the cpu appendix 4.2 precautions about the address space appendix 4.3 precautions about eit appendix 4.4 precautions to be observed when programming internal flash memory appendix 4.5 precautions to be observed after exiting reset appendix 4.6 precautions about input/output ports appendix 4.7 precautions about the dmac appendix 4.8 precautions about the multijunction timers appendix 4.9 precautions about the a-d converter appendix 4.10 precautions about serial i/o appendix 4.11 precautions about can module appendix 4.12 precautions about ram backup mode appendix 4.13 precautions about jtag appendix 4.14 precautions about noise
appendix 4 appendix 4-2 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.1 precautions about the cpu ? precautions regarding data transfer when transferring data, be aware that data arrangements in registers and memory are different.  word data (32 bits) +0 +1 +2 +3 b0 b31 hh hl lh ll b0 b31 hh hl lh ll  halfword data (16 bits) +0 +1 +2 +3 b0 b31 h l b0 b15 h l  byte data (8 bits) +0 +1 +2 +3 b0 b31 b0 b7 (r0?r15) (r0?r15) (r0?r15) +0 +1 +2 +3 b0 b31 b8 b15 (r0?r15) +0 +1 +2 +3 b0 b31 b16 b23 (r0?r15) +0 +1 +2 +3 b0 b31 b24 b31 (r0?r15) +0 +1 +2 +3 b0 b31 h l b16 b31 h l (r0?r15) data in registers data in memory appendix figure 4.1.1 difference in data arrangements appendix 4.1 precautions about the cpu
appendix 4 appendix 4-3 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.2 precautions about the address space  virtual flash emulation function the microcomputer has the function to map up to two 8-kbyte memory blocks of the internal ram into areas of the internal flash memory (l banks) that are divided in 8-kbyte units, as well as to map up to two 4-kbyte memory blocks of the internal ram into areas of the internal flash memory (s banks) that are divided in 4-kbyte units. this function is referred to as the virtual flash emulation function. for details about this function, refer to section 6.6, ?virtual flash emulation function.? appendix 4.3 precautions about eit the address exception (ae) requires caution because if one of the instructions that use ?register indirect + register update? addressing mode (following three) generates an address exception when it is executed, the values of the registers to be automatically updated (rsrc and rsrc2) become undefined. except that the values of rsrc and rsrc2 become undefined, these instructions behave the same way as when used in other addressing modes.  applicable instructions ld rdest, @rsrc+ st rsrc1, @-rsrc2 st rsrc1, @+rsrc2 if the above case applies, consider the fact that the register values become undefined when you design the processing to be performed after executing said instructions. (if an address exception occurs, it means that the system has some fatal fault already existing in it. therefore, address exceptions must be used on condition that control will not be returned from the address exception handler to the program that was being executed when the exception occurred.) appendix 4.4 precautions to be observed when programming internal flash memory the following describes precautions to be taken when programming/erasing the internal flash memory.  when the internal flash memory is programmed or erased, a high voltage is generated internally. because mode transitions during programming/erase operation may cause the chip to break down, make sure the mode setting pin/power supply voltages do not fluctuate to prevent unintended changes of modes.  if the system uses any pins that are to be used by a general-purpose programming/erase tool, care must be taken to prevent adverse effects on the system when the tool is connected.  if the internal flash memory needs to be protected while using a general-purpose programming/erase tool, set any id in the flash memory protect id verification area (h?0000 0084 to h?0000 0093).  if the internal flash memory does not need to be protected while using a general-purpose programming/erase tool, fill the entire flash memory protect id verification area (h?0000 0084 to h?0000 0093) with h?ff.  if the flash status register (fstat)?s each error status is to be cleared (initialized to h?80) by resetting the flash control register 4 (fcnt4) freset bit, check to see that the flash status register (fstat) fbusy bit = "1" (ready) before clearing the error status.  before resetting the flash control register 1 (fcnt1) fentry bit from "1" to "0", check to see that the flash status register (fstat) fbusy bit = "1" (ready). appendix 4.2 precautions about the address space
appendix 4 appendix 4-4 32176 group user?s manual (rev.1.01) summary of precautions  do not clear the fentry bit if the flash control register 1 (fcnt1) fentry bit = "1" and the flash status register (fstat) fbusy bit = "0" (being programmed or erased).  when programming/erasing via jtag, the flash memory can be programmed or erased regardless of the pin state because the fp pin is controlled internally within the chip.appendix 4.5 precautions to be observed after reset appendix 4.5 precautions to be observed after exiting reset  input/output ports after exiting the reset state, the microcomputer?s input/output ports are disabled against input in order to prevent current from flowing through the port. to use any ports in input mode, set the port input special function control register (picnt) pien0 bit to enable them for input. for details, see section 8.3, ?input/output port related registers.? appendix 4.6 precautions about input/output ports  when using input/output ports in output mode because the value of the port data register is undefined when exiting the reset state, the port data register must have its initial value set in it before the port direction register can be set for output. conversely, if the port direction register is set for output before setting data in the port data register, the port data register outputs an undefined value until any data is written into it.  about the port input disable function because the input/output ports are disabled against input after reset, they must be enabled for input by setting the port input enable (pien0) bit to "1" before their input functions can be used. when disabled against input, the input/output ports are in a state equivalent to a situation where the pin has a low- level input applied. consequently, if a peripheral input function is selected for any port while disabled against input by using the port operation mode register, the port may operate unexpectedly due to the low-level input on it. appendix 4.5 precautions to be observed after exiting reset
appendix 4 appendix 4-5 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.7 precautions about the dmac  about writing to the dmac related registers because dma transfer involves exchanging data via the internal bus, the dmac related registers basically can only be accessed for write immediately after reset or when transfer is disabled (transfer enable bit = "0"). when transfer is enabled, do not write to the dmac related registers, except the dma transfer enable bit, the transfer request flag and the dma transfer count register that is protected in hardware. this is a precaution necessary to ensure stable dma operation. the table below lists the registers that can or cannot be accessed for write. appendix table 4.7.1 dmac related registers that can or cannot be accessed for write status transfer enable bit transfer request flag other dmac related registers transfer enabled can be accessed can be accessed cannot be accessed transfer disabled can be accessed can be accessed can be accessed even for registers that can exceptionally be written to while transfer is enabled, the following conditions must be observed: (1) dma channel control register 0 transfer enable bit and transfer request flag for all other bits in this register, be sure to write the same data that those bits had before the write. note, however, that only writing "0" is effective for the transfer request flag. (2) dma transfer count register when transfer is enabled, this register is protected in hardware, so that any data rewritten to it is ignored. (3) rewriting the dma source and dma destination addresses on different channels by dma transfer although this operation means accessing the dmac related registers while dma is enabled, there is no problem. note, however, that no data can be transferred by dma to the dmac related registers on the currently active channel itself.  manipulating the dmac related registers by dma transfer when manipulating the dmac related registers by means of dma transfer (e.g., reloading the dmac related registers with the initial values by dma transfer), do not write to the dmac related registers on the currently active channel through that channel. (if this precaution is neglected, device operation cannot be guaranteed.) it is only the dmac related registers on other channels that can be rewritten by means of dma transfer. (for example, the dman source address and dman destination address registers on channel 1 can be rewritten by dma transfer through channel 0.)  about the dma interrupt request status register when clearing the dma interrupt request status register, be sure to write "1" to all bits, except those to be cleared. writing "1" to any bits in this register has no effect, so that they retain the data they had before the write.  about the stable operation of dma transfer to ensure the stable operation of dma transfer, never rewrite the dmac related registers, except the channel control register?s transfer enable bit, unless transfer is disabled. one exception is that even when transfer is enabled, the dma source address and dma destination address registers can be rewritten by dma transfer from one channel to another. appendix 4.7 precautions about the dmac
appendix 4 appendix 4-6 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.8 precautions about the multijunction timers appendix 4.8.1 precautions on using top single-shot output mode the following describes precautions to be observed when using top single-shot output mode.  if the counter stops due to an underflow in the same clock period as the timer is enabled by external input, the former has priority so that the counter stops.  if the counter stops due to an underflow in the same clock period as count is enabled by writing to the enable bit, the latter has priority so that count is enabled.  if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled.  because the timer operates synchronously with the count clock, a count clock-dependent delay is included before starting f/f operation after the timer is enabled.  when writing to the correction register, be careful not to cause the counter to overflow. even if the counter overflows due to correction of counts, no interrupt requests are generated for reasons of an overflow. therefore, if the counter underflows in the subsequent down-count after an overflow, a false interrupt request is generated for an underflow that includes the overflowed count. appendix 4.8 precautions about the multijunction timers
appendix 4 appendix 4-7 32176 group user?s manual (rev.1.01) summary of precautions appendix figure 4.8.1 example of an operation in top single-shot output mode where count overflows due to correction appendix 4.8 precautions about the multijunction timers h'ffff h'0000 h'fff8 h'(fff0+0014) h'0004 h'fff0 h'0014 h'fff8 h'ffff data inverted by enable data inverted by underflow h'(fff8-1) counter count clock correction register f/f output top interrupt request due to underflow enable bit note:  this diagram does not show detailed timing information. reload register write to the correction register enabled (by writing to the enable bit or by external input) disabled (by underflow) undefined value actual count after overflow overflow occurs undefined in the example below, the reload register is initially set to h?fff8. when the timer starts, the reload register value is loaded into the counter, letting it start counting down. in the diagram below, the value h?0014 is written to the correction register when the counter has counted down to h?fff0. as a result of this correction, the count overflows to h?0004 and the counter fails to count correctly. also, an interrupt request is generated for an erroneous overflowed count.
appendix 4 appendix 4-8 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.8.2 precautions on using top delayed single-shot output mode the following describes precautions to be observed when using top delayed single-shot output mode.  if the counter stops due to an underflow in the same clock period as the timer is enabled by external input, the former has priority so that the counter stops.  if the counter stops due to an underflow in the same clock period as count is enabled by writing to the enable bit, the latter has priority so that count is enabled.  if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled.  even if the counter overflows due to correction of counts, no interrupt requests are generated for reasons of an overflow. therefore, if the counter underflows in the subsequent down-count after an overflow, a false interrupt request is generated for an underflow that includes the overflowed count.  if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge. appendix figure 4.8.2 counter value immediately after underflow count clock enable bit "h" h'0001 h'0000 h'ffff h'aaa9 h'aaa8 counter value h'aaaa reload register reload due to underflow h'(aaaa-1) h'(aaaa-2) what is seen during reload cycle is always h'ffff, and not the reload register value (in this case, h'aaaa). count down from the reload register value reload cycle appendix 4.8 precautions about the multijunction timers
appendix 4 appendix 4-9 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.8.3 precautions on using top continuous output mode the following describes precautions to be observed when using top continuous output mode.  if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled.  if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge.  because the timer operates synchronously with the count clock, a count clock-dependent delay is included before f/f output is inverted after the timer is enabled. appendix 4.8.4 precautions on using tio measure free-run/clear input modes the following describes precautions to be observed when using tio measure free-run/clear input modes.  if measure event input and write to the counter occur in the same clock period, the write value is set in the counter while at the same time latched into the measure register. appendix 4.8.5 precautions on using tio pwm output mode the following describes precautions to be observed when using tio pwm output mode.  if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled.  if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge.  because the timer operates synchronously with the count clock, a count clock-dependent delay is included before f/f output is inverted after the timer is enabled. appendix 4.8.6 precautions on using tio single-shot output mode the following describes precautions to be observed when using tio single-shot output mode.  if the counter stops due to an underflow in the same clock period as the timer is enabled by external input, the former has priority so that the counter stops.  if the counter stops due to an underflow in the same clock period as count is enabled by writing to the enable bit, the latter has priority so that count is enabled.  if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled.  because the timer operates synchronously with the count clock, a count clock-dependent delay is included before f/f output is inverted after the timer is enabled. appendix 4.8 precautions about the multijunction timers
appendix 4 appendix 4-10 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.8.7 precautions on using tio delayed single-shot output mode the following describes precautions to be observed when using tio delayed single-shot output mode.  if the counter stops due to an underflow in the same clock period as the timer is enabled by external input, the former has priority so that the counter stops.  if the counter stops due to an underflow in the same clock period as count is enabled by writing to the enable bit, the latter has priority so that count is enabled.  if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled.  if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge. appendix 4.8.8 precautions on using tio continuous output mode the following describes precautions to be observed when using tio continuous output mode.  if the timer is enabled by external input in the same clock period as count is disabled by writing to the enable bit, the latter has priority so that count is disabled.  if the counter is accessed for read immediately after being reloaded pursuant to an underflow, the counter value temporarily reads as h?ffff but immediately changes to (reload value ? 1) at the next clock edge.  because the timer operates synchronously with the count clock, a count clock-dependent delay is included before f/f output is inverted after the timer is enabled. appendix 4.8.9 precautions on using tms measure input the following describes precautions to be observed when using tms measure input.  if measure event input and write to the counter occur in the same clock period, the write value is set in the counter while at the same time latched into the measure register. appendix 4.8 precautions about the multijunction timers
appendix 4 appendix 4-11 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.8.10 precautions on using tml measure input the following describes precautions to be observed when using tml measure input.  if measure event input and write to the counter occur in the same clock period, the write value is set in the counter, whereas the up-count value (before being rewritten) is latched into the measure register.  if clock bus 1 is selected and any clock other than bclk/2 is used for the timer, the counter cannot be written normally. therefore, when using any clock other than bclk/2, do not write to the counter.  if clock bus 1 is selected and any clock other than bclk/2 is used for the timer, the value captured into the measure register is one count larger the counter value. during the count clock to bclk/2 period interval, how ever, the captured value is exactly the counter value. the diagram below shows the relationship between counter operation and the valid data that can be captured. counter b acde f abcd e  when bclk/2 is selected bclk/2 captured counter b a c  when clock bus 1 is selected bclk/2 count clock captured bcd f appendix figure 4.8.3 mistimed counter value and the captured value appendix 4.8 precautions about the multijunction timers
appendix 4 appendix 4-12 32176 group user?s manual (rev.1.01) summary of precautions appendix figure 4.9.1 internal equivalent circuit of the analog input part appendix 4.9 precautions about the a-d converter appendix 4.9 precautions about the a-d converter  forcible termination during scan operation if a-d conversion is forcibly terminated by setting the a-d conversion stop bit (ad0cstp) to "1" during scan mode operation and the a-d data register for the channel that was in the middle of conversion is accessed for read, the read value shows the last conversion result that had been transferred to the data register before the conversion was forcibly terminated.  modification of the a-d converter related registers if the content of any register?a-d conversion interrupt control register, single or scan mode registers or a-d successive approximation register, except the a-d conversion stop bit?is modified in the middle of a-d conver- sion, the conversion result cannot be guaranteed. therefore, do not modify the contents of these registers while a-d conversion is in progress, or be sure to restart a-d conversion if register contents have been modified.  handling of analog input signals when using the a-d converter with its sample-and-hold function disabled, make sure the analog input level is fixed during a-d conversion.  a-d conversion completed bit read timing to read the a-d conversion completed bit (single mode register 0 bit 5 or scan mode register 0 bit 5) immediately after a-d conversion has started, be sure to adjust the timing 2 bclk periods by, for example, inserting a nop instruction before read.  regarding the analog input pins appendix figure 4.9.1 shows the internal equivalent circuit of the a-d converter?s analog input part. to obtain accurate a-d conversion results, make sure the internal capacitor c2 of the a-d conversion circuit is charged up within a predetermined time (sampling time). to meet this sampling time requirement, it is recommended that a stabilizing capacitor c1 be connected external to the chip. the method for determining the necessary value of this external stabilizing capacitor with respect to the output impedance of an analog output device is described below. also, an explanation is made of the case where the output impedance of an analog output device is low and the external stabilizing capacitor c1 is unnecessary.  rated value of the absolute accuracy the rated value of the absolute accuracy is the actual performance value of the microcomputer alone, with influ- ences of the power supply wiring and noise on the board not taken into account. when designing the application system, use caution for the board layout by, for example, separating the analog circuit power supply and ground (avcc0, avss0 and vref0) from those of the digital circuit and incorporating measures to prevent the analog input pins from being affected by noise, etc. from other digital signals. comparator inside the microcomputer 10-bit a-d successive approximation register (adisar) 10-bit d-a converter vref v2 c2 cin : input pin capacitance (approx. 10 pf) r2 : parasitic resistance of the selector (1-2 k ? ) c2 : comparator capacitance (approx. 2.9 pf) selector r2 i i1 i2 adin n c1 e r1 c1 : parasitic capacitance of the board + stabilizing capacitance r1 : resistance of analog output device analog output device cin e : voltage of analog output device v2 : voltage across c2 vref : analog reference voltage
appendix 4 appendix 4-13 32176 group user?s manual (rev.1.01) summary of precautions thus, for a 10-bit resolution a-d converter where c2 = 2.9 pf, c1 is 0.06 f or more. use this value for reference when setting up c1. (b) maximum value of the output impedance r1 when c1 is not added if the external capacitor c1 in appendix figure 4.9.1 is not used, examination must be made to see if the analog output device can fully charge c2 within a predetermined time. first, the equation to find i2 when c1 in appendix figure 4.9.1 does not exist is shown below. i2 = c2(e - v2) exp { - t } ------------------------- eq. b-1 cin r1+c2(r1+r2) cin r1+c2(r1+r2) appendix 4.9 precautions about the a-d converter appendix figure 4.9.2 a-d conversion timing diagram appendix figure 4.9.2 shows an a-d conversion timing diagram. c2 must be charged up within the sampling time shown in this diagram. when the sample-and-hold function is disabled, the sampling time for the second and subsequent bits is about half that of the first bit. the sampling times at the respective conversion speeds are listed in the appendix table 4.9.1. note that when the sample-and-hold function is enabled, the analog input is sampled for only the first bit. (a) example for calculating the external stabilizing capacitor c1 (addition of this capacitor is recommended) assuming the r1 in appendix figure 4.9.1 is infinitely large and that the current necessary to charge the internal capacitor c2 is supplied from c1, if the potential fluctuation, vp, caused by capacitance division of c1 and c2 is to be within 0.1 lsb, then what amount of capacitance c1 should have. for a 10-bit a-d converter where vref is 5.12 v, 1 lsb determination voltage = 5.12 v / 1,024 = 5 mv. the potential fluctuation of 0.1 lsb means a 0.5 mv fluctuation. adini conversion time for the first bit sampling time comparison time repeated (10 times) for 10 bits second bit sampling time when sample-and-hold is disabled * when sample-and-hold is enabled, the analog input is sampled for only the first bit. vp is also obtained by the equation below: the relationship between the capacitance division of c1 and c2 and the potential fluctuation, vp, is obtained by the equation below: c2 c1 + c2 vp = (e - v2) eq. a-1 1 2 vp = vp1 < eq. a-2 i vref 10 2 x - 1  i = 0 where vp1 = potential fluctuation in the first a-d conversion performed and x = 10 for a 10-bit resolution a-d converter when eq. a-1 and eq. a-2 are solved, the following results: e - v2 vp1 c1 = c2 { - 1 } eq. a-3 1 2  c1 > c2 {10 2 - 1 } eq. a-4 i x - 1  i = 0
appendix 4 appendix 4-14 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.9 precautions about the a-d converter appendix table 4.9.1 sampling time (in which c2 needs to be charged) conversion start method conversion speed sampling time for the first bit sampling time for the second and subsequent bits single mode slow mode normal speed 27.5bclk 13.5bclk (when sample-and double speed 15.5bclk 7.5bclk -hold disabled) fast mode normal speed 11.5bclk 5.5bclk double speed 7.5bclk 3.5bclk single mode slow mode normal speed 27.5bclk ? (when sample-and double speed 15.5bclk ? -hold enabled) fast mode normal speed 11.5bclk ? double speed 7.5bclk ? comparator mode slow mode normal speed 27.5bclk ? double speed 15.5bclk ? fast mode normal speed 11.5bclk ? double speed 7.5bclk ? therefore, the time in which c2 needs to be charged is found from eq. b-1, as follows: sampling time (in which c2 needs to be charged) > cin r1 + c2(r1 + r2) ---- eq. b2 thus, the maximum value of r1 can be obtained as a criterion from the equation below. note, however, that for single mode (when sample-and-hold is disabled), the sampling time for the second and subsequent bits (c2 charging time) must be applied. c2 charging time - c2 r2 r1 < cin + c2
appendix 4 appendix 4-15 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.10 precautions about serial i/o appendix 4.10.1 precautions on using csio mode  settings of sio transmit/receive mode register and sio baud rate register the sio transmit/receive mode register and sio baud rate register and the transmit control register?s brg count source select bit must always be set when the serial i/o is not operating. if a transmit or receive operation is in progress, wait until the transmit and receive operations are finished and then clear the transmit and receive enable bits before making changes.  settings of brg (baud rate register) if f(bclk) is selected with the brg clock source select bit, use caution when setting the brg register so that the transfer rate will not exceed 2 mbps.  about successive transmission to transmit data successively, make sure the next transmit data is set in the sio transmit buffer register before the current data transmission finishes.  about reception because the receive shift clock in csio mode is derived by an operation of the transmit circuit, transmit operation must always be executed (by sending dummy data) even when the serial i/o is used for only receiv- ing data. in this case, be aware that if the port function is set for the txd pin (by setting the operation mode register to "1"), dummy data may actually be output from the pin.  about successive reception to receive data successively, make sure that data (dummy data) is set in the sio transmit buffer register before a transmit operation on the transmitter side starts.  transmission/reception using dma to transmit/receive data in dma request mode, enable the dmac to accept transfer requests (by setting the dma mode register) before serial communication starts.  about reception finished bit if a receive error (overrun error) occurs, the reception finished bit can only be cleared by clearing the receive enable bit, and cannot be cleared by reading out the receive buffer register.  about overrun error if all bits of the next received data have been set in the sio receive shift register before reading out the sio receive buffer register (i.e., an overrun error occurred), the received data is not stored in the receive buffer register, with the previous received data retained in it. although a receive operation continues thereafter, the subsequent received data is not stored in the receive buffer register (receive status bit = "1"). before normal receive operation can be restarted, the receive enable bit must be temporarily cleared to "0". and this is the only way that the overrun error flag can be cleared.  about dma transfer request generation during sio transmission if the transmit buffer register becomes empty (transmit buffer empty flag = "1") while the transmit enable bit remains set to "1" (transmission enabled), an sio transmit buffer empty dma transfer request is generated.  about dma transfer request generation during sio reception if the reception finished bit is set to "1" (receive buffer register full), a reception finished dma transfer request is generated. be aware, however, that if an overrun error occurred during reception, this dma transfer request is not generated. appendix 4.10 precautions about serial i/o
appendix 4 appendix 4-16 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.10.2 precautions on using uart mode  settings of sio transmit/receive mode register and sio baud rate register the sio transmit/receive mode register and sio baud rate register and the transmit control register?s brg count source select bit must always be set when the serial i/o is not operating. if a transmit or receive operation is in progress, wait until the transmit and receive operations are finished and then clear the transmit and receive enable bits before making changes.  settings of brg (baud rate register) writes to the sio baud rate register take effect in the next cycle after the brg counter has finished counting. however, if the register is accessed for write while transmission and reception are disabled, the written value takes effect at the same time it is written.  transmission/reception using dma to transmit/receive data in dma request mode, enable the dmac to accept transfer requests (by setting the dma mode register) before serial communication starts.  about overrun error if all bits of the next received data have been set in the sio receive shift register before reading out the sio receive buffer register (i.e., an overrun error occurred), the received data is not stored in the receive buffer register, with the previous received data retained in it. once an overrun error occurs, although a receive operation continues, the subsequent received data is not stored in the receive buffer register. before normal receive operation can be restarted, the receive enable bit must be temporarily cleared. and this is the only way that the overrun error flag can be cleared.  flags showing the status of uart receive operation there are following flags that indicate the status of receive operation during uart mode:  sio receive control register receive status bit  sio receive control register reception finished bit  sio receive control register receive error sum bit  sio receive control register overrun error bit  sio receive control register parity error bit  sio receive control register framing error bit the manner in which the reception finished bit and various error flags are cleared differs depending on whether an overrun error occurred, as described below. [when an overrun error did not occur] cleared by reading out the lower byte of the receive buffer register or by clearing the receive enable bit. [when an overrun error occurred] cleared by only clearing the receive enable bit. appendix 4.10 precautions about serial i/o
appendix 4 appendix 4-17 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.11 precautions about can module  note for cancelation of transmit and receive can remote frame when aborting remote frame transmission or canceling remote frame receiving, make sure that the ra (remote active) bit is cleared to "0" after writing "h'00" or "h'0f" to the can message slot control register. (1) when aborting remote frame transmission appendix figure 4.11.1 opertion flow when aborting remote frame transmission (2) when canceling remote frame receiving appendix figure 4.11.2 opertion flow when canceling remote frame receiving ra (remote active) bit = "0" complete transmission abort note 1: h'00 or h'0f can be used. no ye s start transmission abort write h'00 or h'0f to can message slot control register (note 1) read can message slot control register complete receiving abort no ye s start receiving abort write h'00 or h'0f to can message slot control register (note 1) read can message slot control register ra (remote active) bit = "0" note 1: h'00 or h'0f can be used. appendix 4.11 precautions about can module
appendix 4 appendix 4-18 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.12 precautions about ram backup mode appendix 4.12 precautions about ram backup mode  precautions to be observed at power-on when changing port x from input mode to output mode after power-on, pay attention to the following. if port x is set for output mode while no data is set in the port x data register, the port?s initial output level is instable. therefore, before changing port x for output mode, make sure the port x data register is set to output a high. unless this precaution is followed, port output may go low at the same time the port is set for output after the oscillation has stabilized, causing the microcomputer to enter ram backup mode.
appendix 4 appendix 4-19 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.13 precautions about jtag appendix 4.13 precautions about jtag appendix 4.13.1 notes on board design when connecting jtag to materialize fast and highly reliable communication with jtag tools, make sure wiring lengths of jtag pins are matched during board design. appendix figure 4.13.1 notes on board design when connecting jtag tools m32r/ecu jtdi jtms jtck jtrst user board jtag tool make sure wiring lengths are the same, and avoid bending wires as much as possible. be careful not to use through-holes within the wiring. jtdo 33 ? 33 ? vcce(5v) 33 ? 33 ? 2k ? 10k ? 10k ? 0.1f sdi connector (jtag connector) power tdi tms tck trst tdo gnd note 1: the reset# related circuit and resistance-capacitance values must be determined depending on the user board's system design conditions and the microcomputer's operating conditions. note 2: n-channel open-drain output is recommended for the reset output of jtag tools. for details, see jtag tool specification s. notes:  only if the jtrst pin is firmly tied to ground, the jtdo, jtdi, jtms and jtclk pins can be processed by either pullup or pulldown.  each of these pins must always be processed even when not using jtag tools. the same pullup/pulldown resistance values as when using jtag tools may be used. reset# (note 1) reset (note 2) 33 ? 10k ? vss 33 ? 10k ? 10k ?
appendix 4 appendix 4-20 32176 group user?s manual (rev.1.01) summary of precautions m32r/ecu jtdi jtms jtck jtrst user board jtdo vcce(5v) 0?100k ? 0?100k ? 0?100k ? 0?100k ? 0?100k ? note:  only if the jtrst pin is firmly tied to ground, the jtdo, jtdi, jtms and jtclk pins can be processed by either pullup or pulldown. appendix 4.13.2 processing pins when not using jtag the following shows how the pins on the chip should be processed when not using jtag tools. appendix figure 4.13.2 processing pins when not using jtag appendix 4.13 precautions about jtag
appendix 4 appendix 4-21 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.14 precautions about noise the following describes precautions to be taken about noise and corrective measures against noise. the cor- rective measures described here are theoretically effective for noise, but require that the application system incorporating those measures be fully evaluated before it can actually be put to use. appendix 4.14.1 reduction of wiring length wiring on the board may serve as an antenna to draw noise into the microcomputer. shorter the total wiring length, the smaller the possibility of drawing noise into the microcomputer. (1) wiring of the reset# pin reduce the length of wiring connecting to the reset# pin. especially when connecting a capacitor between the reset# and vss pins, make sure it is wired to each pin in the shortest distance possible (within 20 mm). reset is a function to initialize the internal logic of the microcomputer. the width of a pulse applied to the reset# pin is important and is therefore specified as part of timing requirements. if a pulse in width shorter than the specified duration (i.e., noise) is applied to the reset# pin, the microcomputer will not be reset for a sufficient duration of time and come out of reset before its internal logic is fully initialized, causing the program to malfunction. appendix figure 4.14.1 example wiring of the reset# pin reset circuit vss reset# vss reset# vss noise reset circuit vss long wiring short wiring appendix 4.14 precautions about noise
appendix 4 appendix 4-22 32176 group user?s manual (rev.1.01) summary of precautions (3) wiring of the operation mode setup pins when connecting the operation mode setup pins and the vcc or vss pin, make sure they are wired in the shortest distance possible. the levels of the operation mode setup pins affect the microcomputer?s operation mode. when connect- ing the operation mode setup pins and the vcc or vss pin, be careful that no noise-induced potential difference will exist between the operation mode setup pins and the vcc or vss pin. this is because the presence of such a potential difference makes operation mode instable, which may result in the micro- computer operating erratically or getting out of control. vss vss operation mode setup pins noise long wiring short wiring operation mode setup pins (2) wiring of clock input/output pins use as much thick and short wiring as possible for connections to the clock input/output pins. when connecting a capacitor to the oscillator, make sure its grounding lead wire and the osc-vss pin on the microcomputer are connected in the shortest distance possible (within 20 mm). also, make sure the vss pattern used for clock oscillation is a large ground plane and is connected to gnd. the microcomputer operates synchronously with the clock generated by an oscillator circuit. inclusion of noise on the clock input/output pins causes the clock waveform to become distorted, which may result in the microcomputer operating erratically or getting out of control. furthermore, if a noise-induced poten- tial difference exists between the microcomputer?s vss level and that of the oscillator, the clock fed into the microcomputer may not be an exact clock. appendix figure 4.14.2 example wiring of clock input/output pins osc-vss xin xo ut vss noise thick and short wiring thin and long wiring osc-vss xin xo ut vss appendix 4.14 precautions about noise appendix figure 4.14.3 example wiring of the mod0 and mod1 pins
appendix 4 appendix 4-23 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.14.3 processing analog input pin wiring insert a resistor of about 100 to 500 ? in series to the analog signal line connecting to the analog input pin at a position as close to the microcomputer as possible. also, insert a capacitor of about 100 pf between the analog input pin and avss pin at a position as close to the avss pin as possible. the signal fed into the analog input pin (e.g., a-d converter input pin) normally is an output signal from a sensor. in many cases, a sensor to detect changes of event is located apart from the board on which the microcomputer is mounted, so that wiring to the analog input pin is inevitably long. because a long wiring serves as an antenna which draws noise into the microcomputer, the signal fed into the analog input pin tends to be noise-ridden. furthermore, if the capacitor connected between the analog input pin and avss pin is grounded at a position apart from the avss pin, noise riding on the ground line may pen- etrate into the microcomputer via the capacitor. appendix figure 4.14.5 example of a resistor and capacitor inserted for the analog signal line appendix 4.14.2 inserting a bypass capacitor between vss and vcc lines insert a bypass capacitor of about 0.1 f between the vss and vcc lines. at this time, make sure the require- ments described below are met.  the wiring length between the vss pin and bypass capacitor and that between the vcc pin and bypass capacitor are the same.  the wiring length between the vss pin and bypass capacitor and that between the vcc pin and bypass capacitor are the shortest distance possible.  the vss and vcc lines have a greater wiring width than that of all other signal lines. appendix figure 4.14.4 example of a bypass capacitor inserted between vss and vcc lines vss vcc chip chip vss vcc vss vcc analog input pin avss sensor noise microcomputer appendix 4.14 precautions about noise
appendix 4 appendix 4-24 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.14.4 consideration about the oscillator the oscillator that generates the fundamental clock for microcomputer operation requires consideration to make it unsusceptible to influences from other signals. (1) avoidance from large-current signal lines signal lines that conduct a large current exceeding the range of current values that the microcomputer can handle must be routed as far away from the microcomputer (especially the oscillator) as possible. also, make sure the circuit is protected with a gnd pattern. systems using a microcomputer have signal lines to control a motor, led or thermal head, for example. when a large current flows in these signal lines, it generates noise due to mutual inductance (m). appendix figure 4.14.6 example wiring of a large-current signal line osc-vss xin xo ut large current noise is generated by mutual inductance between the microcomputer and an adjacent signal line gnd large current m osc-vss xin xo ut gnd m a signal line that conducts a large current exists near the microcomputer. locate a signal line that conducts a large current apart from the microcomputer. appendix 4.14 precautions about noise
appendix 4 appendix 4-25 32176 group user?s manual (rev.1.01) summary of precautions (2) avoiding effects of rapidly level-changing signal lines locate signal lines whose levels change rapidly as far away from the oscillator as possible. also, make sure the rapidly level-changing signal lines will not intersect the clock-related signal lines and other noise-sensi- tive signal lines. rapidly level-changing signal lines tend to affect other signal lines as their voltage level frequently rises and falls. especially if these signal lines intersect the clock-related signal lines, they will cause the clock waveform to become distorted, which may result in the microcomputer operating erratically or getting out of control. appendix figure 4.14.7 example wiring of a rapidly level-changing signal line xin xo ut high-speed serial i/o high-speed timer input/output, etc. signal line intersecting the clock-related and other signal lines xin xo ut high-speed serial i/o high-speed timer input/output, etc. locate the signal line away from the clock-related and other signal lines appendix 4.14 precautions about noise
appendix 4 appendix 4-26 32176 group user?s manual (rev.1.01) summary of precautions (3) protection against signal lines that are the source of strong noise do not use any pin that will probably be subject to strong noise for an adjacent port near the oscillator. if the pin can be left unused, set it for input and connect to gnd via a resistor, or fix it to output and leave open. if the pin needs to be used, it is recommended that it be used for input-only. for protection against a still stronger noise source, set the adjacent port for input and connect to gnd via a resistor, and use those that belong to the same port group as much for input-only as possible. if greater stability is required, do not use those that belong to the same port group and set them for input and connect to gnd via a resistor. if they need to be used, insert a limiting resistor for protection against noise. if the ports or pins adjacent to the oscillator operate at high speed or are exposed to strong noise from an external source, noise may affect the oscillator circuit, causing its oscillation to become instable. appendix figure 4.14.8 example processing of a noise-laden pin xin xo ut noise fast switching adjacent pin/peripheral pin (set for output) oscillator external noise or switching noise switching noise from an output pin applied directly to the port noise adjacent pin/peripheral pin (set for input) external noise from an input pin applied directly to the port appendix 4.14 precautions about noise
appendix 4 appendix 4-27 32176 group user?s manual (rev.1.01) summary of precautions appendix figure 4.14.9 example processing of pins adjacent to the oscillator adjacent pin/peripheral pin (set for input) method for limiting the effect of noise in input mode noise method for limiting noise with a resistor noise fast switching adjacent pin/peripheral pin (set for input) method for limiting the effect of noise in input mode adjacent pin/peripheral pin (set for output) method for limiting the effect of noise in output mode adjacent pin/peripheral pin (set for input) adjacent pin/peripheral pin (set for output) method for limiting switching noise with a resistor appendix 4.14 precautions about noise
appendix 4 appendix 4-28 32176 group user?s manual (rev.1.01) summary of precautions appendix 4.14.5 processing input/output ports for input/output ports, take the appropriate measures in both hardware and software following the procedure described below. hardware measures  insert resistors of 100 ? or more in series to the input/output ports. software measures  for input ports, read out data in a program two or more times to verify that the levels coincide.  for output ports, rewrite the data register at certain intervals because there is a possibility of the output data being inverted by noise.  rewrite the direction register at certain intervals. appendix figure 4.14.10 example processing of input/output ports noise direction register data register data bus input/output port noise appendix 4.14 precautions about noise
sfr index
index-2 sfr index 32176 group user?s manual (rev.1.01) 0-9 ?0?sending bit error detection bit 13-45 ?1?sending bit error detection bit 13-45 8-bit a-d0 data register 0 3-12, 11-12, 11-30 8-bit a-d0 data register 1 3-12, 11-12, 11-30 8-bit a-d0 data register 2 3-12, 11-12, 11-30 8-bit a-d0 data register 3 3-12, 11-12, 11-30 8-bit a-d0 data register 4 3-12, 11-12, 11-30 8-bit a-d0 data register 5 3-12, 11-12, 11-30 8-bit a-d0 data register 6 3-12, 11-12, 11-30 8-bit a-d0 data register 7 3-12, 11-13, 11-30 8-bit a-d0 data register 8 3-12, 11-13, 11-30 8-bit a-d0 data register 9 3-12, 11-13, 11-30 8-bit a-d0 data register 10 3-12, 11-13, 11-30 8-bit a-d0 data register 11 3-12, 11-13, 11-30 8-bit a-d0 data register 12 3-12, 11-13, 11-30 8-bit a-d0 data register 13 3-12, 11-13, 11-30 8-bit a-d0 data register 14 3-12, 11-13, 11-30 8-bit a-d0 data register 15 3-12, 11-13, 11-30 10-bit a-d0 data register 0 3-11, 11-12, 11-29 10-bit a-d0 data register 1 3-11, 11-12, 11-29 10-bit a-d0 data register 2 3-11, 11-12, 11-29 10-bit a-d0 data register 3 3-11, 11-12, 11-29 10-bit a-d0 data register 4 3-11, 11-12, 11-29 10-bit a-d0 data register 5 3-11, 11-12, 11-29 10-bit a-d0 data register 6 3-12, 11-12, 11-29 10-bit a-d0 data register 7 3-12, 11-12, 11-29 10-bit a-d0 data register 8 3-12, 11-12, 11-29 10-bit a-d0 data register 9 3-12, 11-12, 11-29 10-bit a-d0 data register 10 3-12, 11-12, 11-29 10-bit a-d0 data register 11 3-12, 11-12, 11-29 10-bit a-d0 data register 12 3-12, 11-12, 11-29 10-bit a-d0 data register 13 3-12, 11-12, 11-29 10-bit a-d0 data register 14 3-12, 11-12, 11-29 10-bit a-d0 data register 15 3-12, 11-12, 11-29 a ack error detection bit 13-45 acke 13-45 a-d analog input pin select bit 11-16 a-d conversion completed bit 11-18 a-d conversion method select bit 11-16, 11-20 a-d conversion mode select bit 11-16 a-d conversion speed control bit 11-22 a-d conversion speed select bit 11-16, 11-20 a-d conversion start bit 11-14, 11-18 a-d conversion start trigger select bit 11-14, 11-18 a-d conversion stop bit 11-14, 11-18 a-d conversion/comparate completed bit 11-14 a-d hardware trigger select 0 bit 11-14, 11-18 a-d hardware trigger select 1 bit 11-14, 11-18 a-d interrupt/dma transfer request select bit 11-14, 11-18 a-d sample-and-hold conversion speed select bit 11-16, 11-20 a-d scan loop select bit 11-20 a-d scan mode select bit 11-18 a-d0 comparate data register 3-11, 11-12, 11-28 a-d0 conversion interrupt control register 3-11, 5-4, 5-8 a-d0 conversion speed control register 3-11, 11-12, 11-22 a-d0 disconnection detection assist function control register 3-11, 11-12, 11-23 a-d0 disconnection detection assist method select register 3-11, 11-12, 11-24 a-d0 scan mode register 0 3-11, 11-12, 11-18 a-d0 scan mode register 1 3-11, 11-12, 11-20 a-d0 single mode register 0 3-11, 11-12, 11-14 a-d0 single mode register 1 3-11, 11-12, 11-16 a-d0 successive approximation register 3-11, 11-12, 11-27 ad08dt0 3-12, 11-12, 11-30 ad08dt1 3-12, 11-12, 11-30 ad08dt2 3-12, 11-12, 11-30 ad08dt3 3-12, 11-12, 11-30 ad08dt4 3-12, 11-12, 11-30 ad08dt5 3-12, 11-12, 11-30 ad08dt6 3-12, 11-12, 11-30 ad08dt7 3-12, 11-13, 11-30 ad08dt8 3-12, 11-13, 11-30 ad08dt9 3-12, 11-13, 11-30 ad08dt10 3-12, 11-13, 11-30 ad08dt11 3-12, 11-13, 11-30 ad08dt12 3-12, 11-13, 11-30 ad08dt13 3-12, 11-13, 11-30 ad08dt14 3-12, 11-13, 11-30 ad08dt15 3-12, 11-13, 11-30 ad0cmp 3-11, 11-12, 11-28 ad0cvscr 3-11, 11-12, 11-22 ad0ddacr 3-11, 11-12, 11-23 ad0ddasel 3-11, 11-12, 11-24 ad0dt0 3-11, 11-12, 11-29 ad0dt1 3-11, 11-12, 11-29 ad0dt2 3-11, 11-12, 11-29 ad0dt3 3-11, 11-12, 11-29 ad0dt4 3-11, 11-12, 11-29 ad0dt5 3-11, 11-12, 11-29 ad0dt6 3-12, 11-12, 11-29 ad0dt7 3-12, 11-12, 11-29 ad0dt8 3-12, 11-12, 11-29 ad0dt9 3-12, 11-12, 11-29 ad0dt10 3-12, 11-12, 11-29 ad0dt11 3-12, 11-12, 11-29 ad0dt12 3-12, 11-12, 11-29 ad0dt13 3-12, 11-12, 11-29 ad0dt14 3-12, 11-12, 11-29 ad0dt15 3-12, 11-12, 11-29 ad0sar 3-11, 11-12, 11-27 ad0scm0 3-11, 11-12, 11-18 ad0scm1 3-11, 11-12, 11-20 ad0sim0 3-11, 11-12, 11-14 ad0sim1 3-11, 11-12, 11-16 adccmp 11-18 adcmsl 11-18
sfr index index-3 32176 group user?s manual (rev.1.01) adcreq 11-18 adcsel 11-18 adcshsl 11-20 adcshspd 11-20 adcspd 11-20 adcstp 11-18 adcstt 11-18 adctrg0 11-18 adctrg1 11-18 adcvsd 11-22 adddasel0 11-24 adddasel1 11-24 adddasel2 11-24 adddasel3 11-24 adddasel4 11-24 adddasel5 11-24 adddasel6 11-24 adddasel7 11-24 adddasel8 11-24 adddasel9 11-24 adddasel10 11-24 adddasel11 11-24 adddasel12 11-24 adddasel13 11-24 adddasel14 11-24 adddasel15 11-24 adscmp 11-14 adsmsl 11-16 adsreq 11-14 adssel 11-14 adsshsl 11-16 adsshspd 11-16 adsspd 11-16 adsstp 11-14 adsstt 11-14 adstrg0 11-14 adstrg1 11-14 anscan 11-20 ansel 11-16 automatic response inhibit bit 13-55 b basiccan mode bit 13-15 basiccan status bit 13-18 bcm 13-15 bcs 13-18 bite0 13-45 bite1 13-45 bos 13-18 brg count source select bit 12-13 bus mode control bit 15-5 bus mode control register 3-21, 15-5 bus off interrupt request mask bit 13-32 bus off interrupt request status bit 13-31 bus off status bit 13-18 busmod 15-5 busmodc 3-21, 15-5 busy check bit 6-11 c c0gmske0 3-22, 13-4, 13-50 c0gmske1 3-22, 13-4, 13-50 c0gmske2 3-22, 13-4, 13-51 c0gmsks0 3-22, 13-4, 13-49 c0gmsks1 3-22, 13-4, 13-49 c0lmskae0 3-22, 13-4, 13-50 c0lmskae1 3-22, 13-4, 13-50 c0lmskae2 3-22, 13-4, 13-51 c0lmskas0 3-22, 13-4, 13-49 c0lmskas1 3-22, 13-4, 13-49 c0lmskbe0 3-23, 13-4, 13-50 c0lmskbe1 3-23, 13-4, 13-50 c0lmskbe2 3-23, 13-4, 13-51 c0lmskbs0 3-23, 13-4, 13-49 c0lmskbs1 3-23, 13-4, 13-49 c0msl0cnt 3-23, 13-5, 13-54 c0msl0dlc 3-23, 13-5, 13-63 c0msl0dt0 3-23, 13-5, 13-64 c0msl0dt1 3-23, 13-5, 13-65 c0msl0dt2 3-23, 13-5, 13-66 c0msl0dt3 3-23, 13-5, 13-67 c0msl0dt4 3-23, 13-5, 13-68 c0msl0dt5 3-23, 13-5, 13-69 c0msl0dt6 3-23, 13-5, 13-70 c0msl0dt7 3-23, 13-5, 13-71 c0msl0eid0 3-23, 13-5, 13-60 c0msl0eid1 3-23, 13-5, 13-61 c0msl0eid2 3-23, 13-5, 13-62 c0msl0sid0 3-23, 13-5, 13-58 c0msl0sid1 3-23, 13-5, 13-59 c0msl0tsp 3-23, 13-5, 13-72 c0msl10cnt 3-23, 13-5, 13-54 c0msl10dlc 3-26, 13-7, 13-63 c0msl10dt0 3-26, 13-7, 13-64 c0msl10dt1 3-26, 13-7, 13-65 c0msl10dt2 3-26, 13-7, 13-66 c0msl10dt3 3-26, 13-7, 13-67 c0msl10dt4 3-26, 13-7, 13-68 c0msl10dt5 3-26, 13-7, 13-69 c0msl10dt6 3-26, 13-7, 13-70 c0msl10dt7 3-26, 13-7, 13-71 c0msl10eid0 3-26, 13-7, 13-60 c0msl10eid1 3-26, 13-7, 13-61 c0msl10eid2 3-26, 13-7, 13-62 c0msl10sid0 3-26, 13-7, 13-58 c0msl10sid1 3-26, 13-7, 13-59 c0msl10tsp 3-26, 13-7, 13-72 c0msl11cnt 3-23, 13-5, 13-54
index-4 sfr index 32176 group user?s manual (rev.1.01) c0msl11dlc 3-26, 13-8, 13-63 c0msl11dt0 3-26, 13-8, 13-64 c0msl11dt1 3-26, 13-8, 13-65 c0msl11dt2 3-26, 13-8, 13-66 c0msl11dt3 3-26, 13-8, 13-67 c0msl11dt4 3-26, 13-8, 13-68 c0msl11dt5 3-26, 13-8, 13-69 c0msl11dt6 3-26, 13-8, 13-70 c0msl11dt7 3-26, 13-8, 13-71 c0msl11eid0 3-26, 13-8, 13-60 c0msl11eid1 3-26, 13-8, 13-61 c0msl11eid2 3-26, 13-8, 13-62 c0msl11sid0 3-26, 13-8, 13-58 c0msl11sid1 3-26, 13-8, 13-59 c0msl11tsp 3-26, 13-8, 13-72 c0msl12cnt 3-23, 13-5, 13-54 c0msl12dlc 3-26, 13-8, 13-63 c0msl12dt0 3-26, 13-8, 13-64 c0msl12dt1 3-26, 13-8, 13-65 c0msl12dt2 3-26, 13-8, 13-66 c0msl12dt3 3-26, 13-8, 13-67 c0msl12dt4 3-26, 13-8, 13-68 c0msl12dt5 3-26, 13-8, 13-69 c0msl12dt6 3-26, 13-8, 13-70 c0msl12dt7 3-26, 13-8, 13-71 c0msl12eid0 3-26, 13-8, 13-60 c0msl12eid1 3-26, 13-8, 13-61 c0msl12eid2 3-26, 13-8, 13-62 c0msl12sid0 3-26, 13-8, 13-58 c0msl12sid1 3-26, 13-8, 13-59 c0msl12tsp 3-26, 13-8, 13-72 c0msl13cnt 3-23, 13-5, 13-54 c0msl13dlc 3-26, 13-8, 13-63 c0msl13dt0 3-26, 13-8, 13-64 c0msl13dt1 3-26, 13-8, 13-65 c0msl13dt2 3-26, 13-8, 13-66 c0msl13dt3 3-26, 13-8, 13-67 c0msl13dt4 3-26, 13-8, 13-68 c0msl13dt5 3-26, 13-8, 13-69 c0msl13dt6 3-26, 13-8, 13-70 c0msl13dt7 3-26, 13-8, 13-71 c0msl13eid0 3-26, 13-8, 13-60 c0msl13eid1 3-26, 13-8, 13-61 c0msl13eid2 3-26, 13-8, 13-62 c0msl13sid0 3-26, 13-8, 13-58 c0msl13sid1 3-26, 13-8, 13-59 c0msl13tsp 3-26, 13-8, 13-72 c0msl14cnt 3-23, 13-5, 13-54 c0msl14dlc 3-27, 13-8, 13-63 c0msl14dt0 3-27, 13-8, 13-64 c0msl14dt1 3-27, 13-8, 13-65 c0msl14dt2 3-27, 13-8, 13-66 c0msl14dt3 3-27, 13-8, 13-67 c0msl14dt4 3-27, 13-8, 13-68 c0msl14dt5 3-27, 13-8, 13-69 c0msl14dt6 3-27, 13-8, 13-70 c0msl14dt7 3-27, 13-8, 13-71 c0msl14eid0 3-27, 13-8, 13-60 c0msl14eid1 3-27, 13-8, 13-61 c0msl14eid2 3-27, 13-8, 13-62 c0msl14sid0 3-27, 13-8, 13-58 c0msl14sid1 3-27, 13-8, 13-59 c0msl14tsp 3-27, 13-8, 13-72 c0msl15cnt 3-23, 13-5, 13-54 c0msl15dlc 3-27, 13-9, 13-63 c0msl15dt0 3-27, 13-9, 13-64 c0msl15dt1 3-27, 13-9, 13-65 c0msl15dt2 3-27, 13-9, 13-66 c0msl15dt3 3-27, 13-9, 13-67 c0msl15dt4 3-27, 13-9, 13-68 c0msl15dt5 3-27, 13-9, 13-69 c0msl15dt6 3-27, 13-9, 13-70 c0msl15dt7 3-27, 13-9, 13-71 c0msl15eid0 3-27, 13-9, 13-60 c0msl15eid1 3-27, 13-9, 13-61 c0msl15eid2 3-27, 13-9, 13-62 c0msl15sid0 3-27, 13-9, 13-58 c0msl15sid1 3-27, 13-9, 13-59 c0msl15tsp 3-27, 13-9, 13-72 c0msl1cnt 3-23, 13-5, 13-54 c0msl1dlc 3-23, 13-5, 13-63 c0msl1dt0 3-23, 13-5, 13-64 c0msl1dt1 3-23, 13-5, 13-65 c0msl1dt2 3-23, 13-5, 13-66 c0msl1dt3 3-23, 13-5, 13-67 c0msl1dt4 3-23, 13-5, 13-68 c0msl1dt5 3-23, 13-5, 13-69 c0msl1dt6 3-23, 13-5, 13-70 c0msl1dt7 3-23, 13-5, 13-71 c0msl1eid0 3-23, 13-5, 13-60 c0msl1eid1 3-23, 13-5, 13-61 c0msl1eid2 3-23, 13-5, 13-62 c0msl1sid0 3-23, 13-5, 13-58 c0msl1sid1 3-23, 13-5, 13-59 c0msl1tsp 3-23, 13-5, 13-72 c0msl2cnt 3-23, 13-5, 13-54 c0msl2dlc 3-24, 13-5, 13-63 c0msl2dt0 3-24, 13-5, 13-64 c0msl2dt1 3-24, 13-5, 13-65 c0msl2dt2 3-24, 13-5, 13-66 c0msl2dt3 3-24, 13-5, 13-67 c0msl2dt4 3-24, 13-5, 13-68 c0msl2dt5 3-24, 13-5, 13-69 c0msl2dt6 3-24, 13-5, 13-70 c0msl2dt7 3-24, 13-5, 13-71 c0msl2eid0 3-24, 13-5, 13-60 c0msl2eid1 3-24, 13-5, 13-61 c0msl2eid2 3-24, 13-5, 13-62
sfr index index-5 32176 group user?s manual (rev.1.01) c0msl2sid0 3-24, 13-5, 13-58 c0msl2sid1 3-24, 13-5, 13-59 c0msl2tsp 3-24, 13-5, 13-72 c0msl3cnt 3-23, 13-5, 13-54 c0msl3dlc 3-24, 13-6, 13-63 c0msl3dt0 3-24, 13-6, 13-64 c0msl3dt1 3-24, 13-6, 13-65 c0msl3dt2 3-24, 13-6, 13-66 c0msl3dt3 3-24, 13-6, 13-67 c0msl3dt4 3-24, 13-6, 13-68 c0msl3dt5 3-24, 13-6, 13-69 c0msl3dt6 3-24, 13-6, 13-70 c0msl3dt7 3-24, 13-6, 13-71 c0msl3eid0 3-24, 13-6, 13-60 c0msl3eid1 3-24, 13-6, 13-61 c0msl3eid2 3-24, 13-6, 13-62 c0msl3sid0 3-24, 13-6, 13-58 c0msl3sid1 3-24, 13-6, 13-59 c0msl3tsp 3-24, 13-6, 13-72 c0msl4cnt 3-23, 13-5, 13-54 c0msl4dlc 3-24, 13-6, 13-63 c0msl4dt0 3-24, 13-6, 13-64 c0msl4dt1 3-24, 13-6, 13-65 c0msl4dt2 3-24, 13-6, 13-66 c0msl4dt3 3-24, 13-6, 13-67 c0msl4dt4 3-24, 13-6, 13-68 c0msl4dt5 3-24, 13-6, 13-69 c0msl4dt6 3-24, 13-6, 13-70 c0msl4dt7 3-24, 13-6, 13-71 c0msl4eid0 3-24, 13-6, 13-60 c0msl4eid1 3-24, 13-6, 13-61 c0msl4eid2 3-24, 13-6, 13-62 c0msl4sid0 3-24, 13-6, 13-58 c0msl4sid1 3-24, 13-6, 13-59 c0msl4tsp 3-24, 13-6, 13-72 c0msl5cnt 3-23, 13-5, 13-54 c0msl5dlc 3-24, 13-6, 13-63 c0msl5dt0 3-24, 13-6, 13-64 c0msl5dt1 3-24, 13-6, 13-65 c0msl5dt2 3-24, 13-6, 13-66 c0msl5dt3 3-24, 13-6, 13-67 c0msl5dt4 3-24, 13-6, 13-68 c0msl5dt5 3-24, 13-6, 13-69 c0msl5dt6 3-24, 13-6, 13-70 c0msl5dt7 3-24, 13-6, 13-71 c0msl5eid0 3-24, 13-6, 13-60 c0msl5eid1 3-24, 13-6, 13-61 c0msl5eid2 3-24, 13-6, 13-62 c0msl5sid0 3-24, 13-6, 13-58 c0msl5sid1 3-24, 13-6, 13-59 c0msl5tsp 3-24, 13-6, 13-72 c0msl6cnt 3-23, 13-5, 13-54 c0msl6dlc 3-25, 13-6, 13-63 c0msl6dt0 3-25, 13-6, 13-64 c0msl6dt1 3-25, 13-6, 13-65 c0msl6dt2 3-25, 13-6, 13-66 c0msl6dt3 3-25, 13-6, 13-67 c0msl6dt4 3-25, 13-6, 13-68 c0msl6dt5 3-25, 13-6, 13-69 c0msl6dt6 3-25, 13-6, 13-70 c0msl6dt7 3-25, 13-6, 13-71 c0msl6eid0 3-25, 13-6, 13-60 c0msl6eid1 3-25, 13-6, 13-61 c0msl6eid2 3-25, 13-6, 13-62 c0msl6sid0 3-25, 13-6, 13-58 c0msl6sid1 3-25, 13-6, 13-59 c0msl6tsp 3-25, 13-6, 13-72 c0msl7cnt 3-23, 13-5, 13-54 c0msl7dlc 3-25, 13-7, 13-63 c0msl7dt0 3-25, 13-7, 13-64 c0msl7dt1 3-25, 13-7, 13-65 c0msl7dt2 3-25, 13-7, 13-66 c0msl7dt3 3-25, 13-7, 13-67 c0msl7dt4 3-25, 13-7, 13-68 c0msl7dt5 3-25, 13-7, 13-69 c0msl7dt6 3-25, 13-7, 13-70 c0msl7dt7 3-25, 13-7, 13-71 c0msl7eid0 3-25, 13-7, 13-60 c0msl7eid1 3-25, 13-7, 13-61 c0msl7eid2 3-25, 13-7, 13-62 c0msl7sid0 3-25, 13-7, 13-58 c0msl7sid1 3-25, 13-7, 13-59 c0msl7tsp 3-25, 13-7, 13-72 c0msl8cnt 3-23, 13-5, 13-54 c0msl8dlc 3-25, 13-7, 13-63 c0msl8dt0 3-25, 13-7, 13-64 c0msl8dt1 3-25, 13-7, 13-65 c0msl8dt2 3-25, 13-7, 13-66 c0msl8dt3 3-25, 13-7, 13-67 c0msl8dt4 3-25, 13-7, 13-68 c0msl8dt5 3-25, 13-7, 13-69 c0msl8dt6 3-25, 13-7, 13-70 c0msl8dt7 3-25, 13-7, 13-71 c0msl8eid0 3-25, 13-7, 13-60 c0msl8eid1 3-25, 13-7, 13-61 c0msl8eid2 3-25, 13-7, 13-62 c0msl8sid0 3-25, 13-7, 13-58 c0msl8sid1 3-25, 13-7, 13-59 c0msl8tsp 3-25, 13-7, 13-72 c0msl9cnt 3-23, 13-5, 13-54 c0msl9dlc 3-25, 13-7, 13-63 c0msl9dt0 3-25, 13-7, 13-64 c0msl9dt1 3-25, 13-7, 13-65 c0msl9dt2 3-25, 13-7, 13-66 c0msl9dt3 3-25, 13-7, 13-67 c0msl9dt4 3-25, 13-7, 13-68 c0msl9dt5 3-25, 13-7, 13-69 c0msl9dt6 3-25, 13-7, 13-70
index-6 sfr index 32176 group user?s manual (rev.1.01) c0msl9dt7 3-25, 13-7, 13-71 c0msl9eid0 3-25, 13-7, 13-60 c0msl9eid1 3-25, 13-7, 13-61 c0msl9eid2 3-25, 13-7, 13-62 c0msl9sid0 3-25, 13-7, 13-58 c0msl9sid1 3-25, 13-7, 13-59 c0msl9tsp 3-25, 13-7, 13-72 c1gmske0 3-27, 13-9, 13-50 c1gmske1 3-27, 13-9, 13-50 c1gmske2 3-27, 13-9, 13-51 c1gmsks0 3-27, 13-9, 13-49 c1gmsks1 3-27, 13-9, 13-49 c1lmskae0 3-28, 13-9, 13-50 c1lmskae1 3-28, 13-9, 13-50 c1lmskae2 3-28, 13-9, 13-51 c1lmskas0 3-28, 13-9, 13-49 c1lmskas1 3-28, 13-9, 13-49 c1lmskbe0 3-28, 13-9, 13-50 c1lmskbe1 3-28, 13-9, 13-50 c1lmskbe2 3-28, 13-9, 13-51 c1lmskbs0 3-28, 13-9, 13-49 c1lmskbs1 3-28, 13-9, 13-49 c1msl0cnt 3-28, 13-10, 13-54 c1msl0dlc 3-28, 13-10, 13-63 c1msl0dt0 3-28, 13-10, 13-64 c1msl0dt1 3-28, 13-10, 13-65 c1msl0dt2 3-28, 13-10, 13-66 c1msl0dt3 3-28, 13-10, 13-67 c1msl0dt4 3-28, 13-10, 13-68 c1msl0dt5 3-28, 13-10, 13-69 c1msl0dt6 3-28, 13-10, 13-70 c1msl0dt7 3-28, 13-10, 13-71 c1msl0eid0 3-28, 13-10, 13-60 c1msl0eid1 3-28, 13-10, 13-61 c1msl0eid2 3-28, 13-10, 13-62 c1msl0sid0 3-28, 13-10, 13-58 c1msl0sid1 3-28, 13-10, 13-59 c1msl0tsp 3-28, 13-10, 13-72 c1msl10cnt 3-28, 13-10, 13-54 c1msl10dlc 3-31, 13-13, 13-63 c1msl10dt0 3-31, 13-13, 13-64 c1msl10dt1 3-31, 13-13, 13-65 c1msl10dt2 3-31, 13-13, 13-66 c1msl10dt3 3-31, 13-13, 13-67 c1msl10dt4 3-31, 13-13, 13-68 c1msl10dt5 3-31, 13-13, 13-69 c1msl10dt6 3-31, 13-13, 13-70 c1msl10dt7 3-31, 13-13, 13-71 c1msl10eid0 3-31, 13-13, 13-60 c1msl10eid1 3-31, 13-13, 13-61 c1msl10eid2 3-31, 13-13, 13-62 c1msl10sid0 3-31, 13-13, 13-58 c1msl10sid1 3-31, 13-13, 13-59 c1msl10tsp 3-31, 13-13, 13-72 c1msl11cnt 3-28, 13-10, 13-54 c1msl11dlc 3-31, 13-13, 13-63 c1msl11dt0 3-31, 13-13, 13-64 c1msl11dt1 3-31, 13-13, 13-65 c1msl11dt2 3-31, 13-13, 13-66 c1msl11dt3 3-31, 13-13, 13-67 c1msl11dt4 3-31, 13-13, 13-68 c1msl11dt5 3-31, 13-13, 13-69 c1msl11dt6 3-31, 13-13, 13-70 c1msl11dt7 3-31, 13-13, 13-71 c1msl11eid0 3-31, 13-13, 13-60 c1msl11eid1 3-31, 13-13, 13-61 c1msl11eid2 3-31, 13-13, 13-62 c1msl11sid0 3-31, 13-13, 13-58 c1msl11sid1 3-31, 13-13, 13-59 c1msl11tsp 3-31, 13-13, 13-72 c1msl12cnt 3-28, 13-10, 13-54 c1msl12dlc 3-31, 13-13, 13-63 c1msl12dt0 3-31, 13-13, 13-64 c1msl12dt1 3-31, 13-13, 13-65 c1msl12dt2 3-31, 13-13, 13-66 c1msl12dt3 3-31, 13-13, 13-67 c1msl12dt4 3-31, 13-13, 13-68 c1msl12dt5 3-31, 13-13, 13-69 c1msl12dt6 3-31, 13-13, 13-70 c1msl12dt7 3-31, 13-13, 13-71 c1msl12eid0 3-31, 13-13, 13-60 c1msl12eid1 3-31, 13-13, 13-61 c1msl12eid2 3-31, 13-13, 13-62 c1msl12sid0 3-31, 13-13, 13-58 c1msl12sid1 3-31, 13-13, 13-59 c1msl12tsp 3-31, 13-13, 13-72 c1msl13cnt 3-28, 13-10, 13-54 c1msl13dlc 3-32, 13-13, 13-63 c1msl13dt0 3-32, 13-13, 13-64 c1msl13dt1 3-32, 13-13, 13-65 c1msl13dt2 3-32, 13-13, 13-66 c1msl13dt3 3-32, 13-13, 13-67 c1msl13dt4 3-32, 13-13, 13-68 c1msl13dt5 3-32, 13-13, 13-69 c1msl13dt6 3-32, 13-13, 13-70 c1msl13dt7 3-32, 13-13, 13-71 c1msl13eid0 3-32, 13-13, 13-60 c1msl13eid1 3-32, 13-13, 13-61 c1msl13eid2 3-32, 13-13, 13-62 c1msl13sid0 3-32, 13-13, 13-58 c1msl13sid1 3-32, 13-13, 13-59 c1msl13tsp 3-32, 13-13, 13-72 c1msl14cnt 3-28, 13-10, 13-54 c1msl14dlc 3-32, 13-14, 13-63 c1msl14dt0 3-32, 13-14, 13-64 c1msl14dt1 3-32, 13-14, 13-65 c1msl14dt2 3-32, 13-14, 13-66 c1msl14dt3 3-32, 13-14, 13-67
sfr index index-7 32176 group user?s manual (rev.1.01) c1msl14dt4 3-32, 13-14, 13-68 c1msl14dt5 3-32, 13-14, 13-69 c1msl14dt6 3-32, 13-14, 13-70 c1msl14dt7 3-32, 13-14, 13-71 c1msl14eid0 3-32, 13-14, 13-60 c1msl14eid1 3-32, 13-14, 13-61 c1msl14eid2 3-32, 13-14, 13-62 c1msl14sid0 3-32, 13-14, 13-58 c1msl14sid1 3-32, 13-14, 13-59 c1msl14tsp 3-32, 13-14, 13-72 c1msl15cnt 3-28, 13-10, 13-54 c1msl15dlc 3-32, 13-14, 13-63 c1msl15dt0 3-32, 13-14, 13-64 c1msl15dt1 3-32, 13-14, 13-65 c1msl15dt2 3-32, 13-14, 13-66 c1msl15dt3 3-32, 13-14, 13-67 c1msl15dt4 3-32, 13-14, 13-68 c1msl15dt5 3-32, 13-14, 13-69 c1msl15dt6 3-32, 13-14, 13-70 c1msl15dt7 3-32, 13-14, 13-71 c1msl15eid0 3-32, 13-14, 13-60 c1msl15eid1 3-32, 13-14, 13-61 c1msl15eid2 3-32, 13-14, 13-62 c1msl15sid0 3-32, 13-14, 13-58 c1msl15sid1 3-32, 13-14, 13-59 c1msl15tsp 3-32, 13-14, 13-72 c1msl1cnt 3-28, 13-10, 13-54 c1msl1dlc 3-29, 13-10, 13-63 c1msl1dt0 3-29, 13-10, 13-64 c1msl1dt1 3-29, 13-10, 13-65 c1msl1dt2 3-29, 13-10, 13-66 c1msl1dt3 3-29, 13-10, 13-67 c1msl1dt4 3-29, 13-10, 13-68 c1msl1dt5 3-29, 13-10, 13-69 c1msl1dt6 3-29, 13-10, 13-70 c1msl1dt7 3-29, 13-10, 13-71 c1msl1eid0 3-29, 13-10, 13-60 c1msl1eid1 3-29, 13-10, 13-61 c1msl1eid2 3-29, 13-10, 13-62 c1msl1sid0 3-29, 13-10, 13-58 c1msl1sid1 3-29, 13-10, 13-59 c1msl1tsp 3-29, 13-10, 13-72 c1msl2cnt 3-28, 13-10, 13-54 c1msl2dlc 3-29, 13-11, 13-63 c1msl2dt0 3-29, 13-11, 13-64 c1msl2dt1 3-29, 13-11, 13-65 c1msl2dt2 3-29, 13-11, 13-66 c1msl2dt3 3-29, 13-11, 13-67 c1msl2dt4 3-29, 13-11, 13-68 c1msl2dt5 3-29, 13-11, 13-69 c1msl2dt6 3-29, 13-11, 13-70 c1msl2dt7 3-29, 13-11, 13-71 c1msl2eid0 3-29, 13-11, 13-60 c1msl2eid1 3-29, 13-11, 13-61 c1msl2eid2 3-29, 13-11, 13-62 c1msl2sid0 3-29, 13-11, 13-58 c1msl2sid1 3-29, 13-11, 13-59 c1msl2tsp 3-29, 13-11, 13-72 c1msl3cnt 3-28, 13-10, 13-54 c1msl3dlc 3-29, 13-11, 13-63 c1msl3dt0 3-29, 13-11, 13-64 c1msl3dt1 3-29, 13-11, 13-65 c1msl3dt2 3-29, 13-11, 13-66 c1msl3dt3 3-29, 13-11, 13-67 c1msl3dt4 3-29, 13-11, 13-68 c1msl3dt5 3-29, 13-11, 13-69 c1msl3dt6 3-29, 13-11, 13-70 c1msl3dt7 3-29, 13-11, 13-71 c1msl3eid0 3-29, 13-11, 13-60 c1msl3eid1 3-29, 13-11, 13-61 c1msl3eid2 3-29, 13-11, 13-62 c1msl3sid0 3-29, 13-11, 13-58 c1msl3sid1 3-29, 13-11, 13-59 c1msl3tsp 3-29, 13-11, 13-72 c1msl4cnt 3-28, 13-10, 13-54 c1msl4dlc 3-29, 13-11, 13-63 c1msl4dt0 3-29, 13-11, 13-64 c1msl4dt1 3-29, 13-11, 13-65 c1msl4dt2 3-29, 13-11, 13-66 c1msl4dt3 3-29, 13-11, 13-67 c1msl4dt4 3-29, 13-11, 13-68 c1msl4dt5 3-29, 13-11, 13-69 c1msl4dt6 3-29, 13-11, 13-70 c1msl4dt7 3-29, 13-11, 13-71 c1msl4eid0 3-29, 13-11, 13-60 c1msl4eid1 3-29, 13-11, 13-61 c1msl4eid2 3-29, 13-11, 13-62 c1msl4sid0 3-29, 13-11, 13-58 c1msl4sid1 3-29, 13-11, 13-59 c1msl4tsp 3-29, 13-11, 13-72 c1msl5cnt 3-28, 13-10, 13-54 c1msl5dlc 3-30, 13-11, 13-63 c1msl5dt0 3-30, 13-11, 13-64 c1msl5dt1 3-30, 13-11, 13-65 c1msl5dt2 3-30, 13-11, 13-66 c1msl5dt3 3-30, 13-11, 13-67 c1msl5dt4 3-30, 13-11, 13-68 c1msl5dt5 3-30, 13-11, 13-69 c1msl5dt6 3-30, 13-11, 13-70 c1msl5dt7 3-30, 13-11, 13-71 c1msl5eid0 3-30, 13-11, 13-60 c1msl5eid1 3-30, 13-11, 13-61 c1msl5eid2 3-30, 13-11, 13-62 c1msl5sid0 3-30, 13-11, 13-58 c1msl5sid1 3-30, 13-11, 13-59 c1msl5tsp 3-30, 13-11, 13-72 c1msl6cnt 3-28, 13-10, 13-54 c1msl6dlc 3-30, 13-12, 13-63
index-8 sfr index 32176 group user?s manual (rev.1.01) c1msl6dt0 3-30, 13-12, 13-64 c1msl6dt1 3-30, 13-12, 13-65 c1msl6dt2 3-30, 13-12, 13-66 c1msl6dt3 3-30, 13-12, 13-67 c1msl6dt4 3-30, 13-12, 13-68 c1msl6dt5 3-30, 13-12, 13-69 c1msl6dt6 3-30, 13-12, 13-70 c1msl6dt7 3-30, 13-12, 13-71 c1msl6eid0 3-30, 13-12, 13-60 c1msl6eid1 3-30, 13-12, 13-61 c1msl6eid2 3-30, 13-12, 13-62 c1msl6sid0 3-30, 13-12, 13-58 c1msl6sid1 3-30, 13-12, 13-59 c1msl6tsp 3-30, 13-12, 13-72 c1msl7cnt 3-28, 13-10, 13-54 c1msl7dlc 3-30, 13-12, 13-63 c1msl7dt0 3-30, 13-12, 13-64 c1msl7dt1 3-30, 13-12, 13-65 c1msl7dt2 3-30, 13-12, 13-66 c1msl7dt3 3-30, 13-12, 13-67 c1msl7dt4 3-30, 13-12, 13-68 c1msl7dt5 3-30, 13-12, 13-69 c1msl7dt6 3-30, 13-12, 13-70 c1msl7dt7 3-30, 13-12, 13-71 c1msl7eid0 3-30, 13-12, 13-60 c1msl7eid1 3-30, 13-12, 13-61 c1msl7eid2 3-30, 13-12, 13-62 c1msl7sid0 3-30, 13-12, 13-58 c1msl7sid1 3-30, 13-12, 13-59 c1msl7tsp 3-30, 13-12, 13-72 c1msl8cnt 3-28, 13-10, 13-54 c1msl8dlc 3-30, 13-12, 13-63 c1msl8dt0 3-30, 13-12, 13-64 c1msl8dt1 3-30, 13-12, 13-65 c1msl8dt2 3-30, 13-12, 13-66 c1msl8dt3 3-30, 13-12, 13-67 c1msl8dt4 3-30, 13-12, 13-68 c1msl8dt5 3-30, 13-12, 13-69 c1msl8dt6 3-30, 13-12, 13-70 c1msl8dt7 3-30, 13-12, 13-71 c1msl8eid0 3-30, 13-12, 13-60 c1msl8eid1 3-30, 13-12, 13-61 c1msl8eid2 3-30, 13-12, 13-62 c1msl8sid0 3-30, 13-12, 13-58 c1msl8sid1 3-30, 13-12, 13-59 c1msl8tsp 3-30, 13-12, 13-72 c1msl9cnt 3-28, 13-10, 13-54 c1msl9dlc 3-31, 13-12, 13-63 c1msl9dt0 3-31, 13-12, 13-64 c1msl9dt1 3-31, 13-12, 13-65 c1msl9dt2 3-31, 13-12, 13-66 c1msl9dt3 3-31, 13-12, 13-67 c1msl9dt4 3-31, 13-12, 13-68 c1msl9dt5 3-31, 13-12, 13-69 c1msl9dt6 3-31, 13-12, 13-70 c1msl9dt7 3-31, 13-12, 13-71 c1msl9eid0 3-31, 13-12, 13-60 c1msl9eid1 3-31, 13-12, 13-61 c1msl9eid2 3-31, 13-12, 13-62 c1msl9sid0 3-31, 13-12, 13-58 c1msl9sid1 3-31, 13-12, 13-59 c1msl9tsp 3-31, 13-12, 13-72 can bus error bit 13-18 can bus error interrupt request mask bit 13-32 can bus error interrupt request status bit 13-31 can dma0 transfer request source select bit 13-48 can dma1 transfer request source select bit 13-48 can operation mode select bit 13-47 can reset bit 13-15 can reset status bit 13-18 can0 baud rate prescaler 3-22, 13-4, 13-26 can0 cause of error register 3-22, 13-4, 13-45 can0 configuration register 3-22, 13-4, 13-22 can0 control register 3-22, 13-4, 13-15 can0 dma transfer request select register 3-22, 13-4, 13-48 can0 error interrupt request mask register 3-22, 13-4, 13-32 can0 error interrupt request status register 3-22, 13-4, 13-31 can0 extended id register 3-22, 13-4, 13-21 can0 global mask register extended id 0 3-22, 13-4, 13-50 can0 global mask register extended id 1 3-22, 13-4, 13-50 can0 global mask register extended id 2 3-22, 13-4, 13-51 can0 global mask register standard id 0 3-22, 13-4, 13-49 can0 global mask register standard id 1 3-22, 13-4, 13-49 can0 local mask register a extended id 0 3-22, 13-4, 13-50 can0 local mask register a extended id 1 3-22, 13-4, 13-50 can0 local mask register a extended id 2 3-22, 13-4, 13-51 can0 local mask register a standard id 0 3-22, 13-4, 13-49 can0 local mask register a standard id 1 3-22, 13-4, 13-49 can0 local mask register b extended id 0 3-23, 13-4, 13-50 can0 local mask register b extended id 1 3-23, 13-4, 13-50 can0 local mask register b extended id 2 3-23, 13-4, 13-51 can0 local mask register b standard id 0 3-23, 13-4, 13-49 can0 local mask register b standard id 1 3-23, 13-4, 13-49 can0 message slot 0 control register 3-23, 13-5, 13-54 can0 message slot 0 data 0 3-23, 13-5, 13-64 can0 message slot 0 data 1 3-23, 13-5, 13-65 can0 message slot 0 data 2 3-23, 13-5, 13-66 can0 message slot 0 data 3 3-23, 13-5, 13-67 can0 message slot 0 data 4 3-23, 13-5, 13-68 can0 message slot 0 data 5 3-23, 13-5, 13-69 can0 message slot 0 data 6 3-23, 13-5, 13-70 can0 message slot 0 data 7 3-23, 13-5, 13-71 can0 message slot 0 data length register 3-23, 13-5, 13-63 can0 message slot 0 extended id 0 3-23, 13-5, 13-60 can0 message slot 0 extended id 1 3-23, 13-5, 13-61 can0 message slot 0 extended id 2 3-23, 13-5, 13-62 can0 message slot 0 standard id 0 3-23, 13-5, 13-58 can0 message slot 0 standard id 1 3-23, 13-5, 13-59
sfr index index-9 32176 group user?s manual (rev.1.01) can0 message slot 0 timestamp 3-23, 13-5, 13-72 can0 message slot 1 control register 3-23, 13-5, 13-54 can0 message slot 1 data 0 3-23, 13-5, 13-64 can0 message slot 1 data 1 3-23, 13-5, 13-65 can0 message slot 1 data 2 3-23, 13-5, 13-66 can0 message slot 1 data 3 3-23, 13-5, 13-67 can0 message slot 1 data 4 3-23, 13-5, 13-68 can0 message slot 1 data 5 3-23, 13-5, 13-69 can0 message slot 1 data 6 3-23, 13-5, 13-70 can0 message slot 1 data 7 3-23, 13-5, 13-71 can0 message slot 1 data length register 3-23, 13-5, 13-63 can0 message slot 1 extended id 0 3-23, 13-5, 13-60 can0 message slot 1 extended id 1 3-23, 13-5, 13-61 can0 message slot 1 extended id 2 3-23, 13-5, 13-62 can0 message slot 1 standard id 0 3-23, 13-5, 13-58 can0 message slot 1 standard id 1 3-23, 13-5, 13-59 can0 message slot 1 timestamp 3-23, 13-5, 13-72 can0 message slot 2 control register 3-23, 13-5, 13-54 can0 message slot 2 data 0 3-24, 13-5, 13-64 can0 message slot 2 data 1 3-24, 13-5, 13-65 can0 message slot 2 data 2 3-24, 13-5, 13-66 can0 message slot 2 data 3 3-24, 13-5, 13-67 can0 message slot 2 data 4 3-24, 13-5, 13-68 can0 message slot 2 data 5 3-24, 13-5, 13-69 can0 message slot 2 data 6 3-24, 13-5, 13-70 can0 message slot 2 data 7 3-24, 13-5, 13-71 can0 message slot 2 data length register 3-24, 13-5, 13-63 can0 message slot 2 extended id 0 3-24, 13-5, 13-60 can0 message slot 2 extended id 1 3-24, 13-5, 13-61 can0 message slot 2 extended id 2 3-24, 13-5, 13-62 can0 message slot 2 standard id 0 3-24, 13-5, 13-58 can0 message slot 2 standard id 1 3-24, 13-5, 13-59 can0 message slot 2 timestamp 3-24, 13-5, 13-72 can0 message slot 3 control register 3-23, 13-5, 13-54 can0 message slot 3 data 0 3-24, 13-6, 13-64 can0 message slot 3 data 1 3-24, 13-6, 13-65 can0 message slot 3 data 2 3-24, 13-6, 13-66 can0 message slot 3 data 3 3-24, 13-6, 13-67 can0 message slot 3 data 4 3-24, 13-6, 13-68 can0 message slot 3 data 5 3-24, 13-6, 13-69 can0 message slot 3 data 6 3-24, 13-6, 13-70 can0 message slot 3 data 7 3-24, 13-6, 13-71 can0 message slot 3 data length register 3-24, 13-6, 13-63 can0 message slot 3 extended id 0 3-24, 13-6, 13-60 can0 message slot 3 extended id 1 3-24, 13-6, 13-61 can0 message slot 3 extended id 2 3-24, 13-6, 13-62 can0 message slot 3 standard id 0 3-24, 13-6, 13-58 can0 message slot 3 standard id 1 3-24, 13-6, 13-59 can0 message slot 3 timestamp 3-24, 13-6, 13-72 can0 message slot 4 control register 3-23, 13-5, 13-54 can0 message slot 4 data 0 3-24, 13-6, 13-64 can0 message slot 4 data 1 3-24, 13-6, 13-65 can0 message slot 4 data 2 3-24, 13-6, 13-66 can0 message slot 4 data 3 3-24, 13-6, 13-67 can0 message slot 4 data 4 3-24, 13-6, 13-68 can0 message slot 4 data 5 3-24, 13-6, 13-69 can0 message slot 4 data 6 3-24, 13-6, 13-70 can0 message slot 4 data 7 3-24, 13-6, 13-71 can0 message slot 4 data length register 3-24, 13-6, 13-63 can0 message slot 4 extended id 0 3-24, 13-6, 13-60 can0 message slot 4 extended id 1 3-24, 13-6, 13-61 can0 message slot 4 extended id 2 3-24, 13-6, 13-62 can0 message slot 4 standard id 0 3-24, 13-6, 13-58 can0 message slot 4 standard id 1 3-24, 13-6, 13-59 can0 message slot 4 timestamp 3-24, 13-6, 13-72 can0 message slot 5 control register 3-23, 13-5, 13-54 can0 message slot 5 data 0 3-24, 13-6, 13-64 can0 message slot 5 data 1 3-24, 13-6, 13-65 can0 message slot 5 data 2 3-24, 13-6, 13-66 can0 message slot 5 data 3 3-24, 13-6, 13-67 can0 message slot 5 data 4 3-24, 13-6, 13-68 can0 message slot 5 data 5 3-24, 13-6, 13-69 can0 message slot 5 data 6 3-24, 13-6, 13-70 can0 message slot 5 data 7 3-24, 13-6, 13-71 can0 message slot 5 data length register 3-24, 13-6, 13-63 can0 message slot 5 extended id 0 3-24, 13-6, 13-60 can0 message slot 5 extended id 1 3-24, 13-6, 13-61 can0 message slot 5 extended id 2 3-24, 13-6, 13-62 can0 message slot 5 standard id 0 3-24, 13-6, 13-58 can0 message slot 5 standard id 1 3-24, 13-6, 13-59 can0 message slot 5 timestamp 3-24, 13-6, 13-72 can0 message slot 6 control register 3-23, 13-5, 13-54 can0 message slot 6 data 0 3-25, 13-6, 13-64 can0 message slot 6 data 1 3-25, 13-6, 13-65 can0 message slot 6 data 2 3-25, 13-6, 13-66 can0 message slot 6 data 3 3-25, 13-6, 13-67 can0 message slot 6 data 4 3-25, 13-6, 13-68 can0 message slot 6 data 5 3-25, 13-6, 13-69 can0 message slot 6 data 6 3-25, 13-6, 13-70 can0 message slot 6 data 7 3-25, 13-6, 13-71 can0 message slot 6 data length register 3-25, 13-6, 13-63 can0 message slot 6 extended id 0 3-25, 13-6, 13-60 can0 message slot 6 extended id 1 3-25, 13-6, 13-61 can0 message slot 6 extended id 2 3-25, 13-6, 13-62 can0 message slot 6 standard id 0 3-25, 13-6, 13-58 can0 message slot 6 standard id 1 3-25, 13-6, 13-59 can0 message slot 6 timestamp 3-25, 13-6, 13-72 can0 message slot 7 control register 3-23, 13-5, 13-54 can0 message slot 7 data 0 3-25, 13-7, 13-64 can0 message slot 7 data 1 3-25, 13-7, 13-65 can0 message slot 7 data 2 3-25, 13-7, 13-66 can0 message slot 7 data 3 3-25, 13-7, 13-67 can0 message slot 7 data 4 3-25, 13-7, 13-68 can0 message slot 7 data 5 3-25, 13-7, 13-69 can0 message slot 7 data 6 3-25, 13-7, 13-70 can0 message slot 7 data 7 3-25, 13-7, 13-71 can0 message slot 7 data length register 3-25, 13-7, 13-63 can0 message slot 7 extended id 0 3-25, 13-7, 13-60
index-10 sfr index 32176 group user?s manual (rev.1.01) can0 message slot 7 extended id 1 3-25, 13-7, 13-61 can0 message slot 7 extended id 2 3-25, 13-7, 13-62 can0 message slot 7 standard id 0 3-25, 13-7, 13-58 can0 message slot 7 standard id 1 3-25, 13-7, 13-59 can0 message slot 7 timestamp 3-25, 13-7, 13-72 can0 message slot 8 control register 3-23, 13-5, 13-54 can0 message slot 8 data 0 3-25, 13-7, 13-64 can0 message slot 8 data 1 3-25, 13-7, 13-65 can0 message slot 8 data 2 3-25, 13-7, 13-66 can0 message slot 8 data 3 3-25, 13-7, 13-67 can0 message slot 8 data 4 3-25, 13-7, 13-68 can0 message slot 8 data 5 3-25, 13-7, 13-69 can0 message slot 8 data 6 3-25, 13-7, 13-70 can0 message slot 8 data 7 3-25, 13-7, 13-71 can0 message slot 8 data length register 3-25, 13-7, 13-63 can0 message slot 8 extended id 0 3-25, 13-7, 13-60 can0 message slot 8 extended id 1 3-25, 13-7, 13-61 can0 message slot 8 extended id 2 3-25, 13-7, 13-62 can0 message slot 8 standard id 0 3-25, 13-7, 13-58 can0 message slot 8 standard id 1 3-25, 13-7, 13-59 can0 message slot 8 timestamp 3-25, 13-7, 13-72 can0 message slot 9 control register 3-23, 13-5, 13-54 can0 message slot 9 data 0 3-25, 13-7, 13-64 can0 message slot 9 data 1 3-25, 13-7, 13-65 can0 message slot 9 data 2 3-25, 13-7, 13-66 can0 message slot 9 data 3 3-25, 13-7, 13-67 can0 message slot 9 data 4 3-25, 13-7, 13-68 can0 message slot 9 data 5 3-25, 13-7, 13-69 can0 message slot 9 data 6 3-25, 13-7, 13-70 can0 message slot 9 data 7 3-25, 13-7, 13-71 can0 message slot 9 data length register 3-25, 13-7, 13-63 can0 message slot 9 extended id 0 3-25, 13-7, 13-60 can0 message slot 9 extended id 1 3-25, 13-7, 13-61 can0 message slot 9 extended id 2 3-25, 13-7, 13-62 can0 message slot 9 standard id 0 3-25, 13-7, 13-58 can0 message slot 9 standard id 1 3-25, 13-7, 13-59 can0 message slot 9 timestamp 3-25, 13-7, 13-72 can0 message slot 10 control register 3-23, 13-5, 13-54 can0 message slot 10 data 0 3-26, 13-7, 13-64 can0 message slot 10 data 1 3-26, 13-7, 13-65 can0 message slot 10 data 2 3-26, 13-7, 13-66 can0 message slot 10 data 3 3-26, 13-7, 13-67 can0 message slot 10 data 4 3-26, 13-7, 13-68 can0 message slot 10 data 5 3-26, 13-7, 13-69 can0 message slot 10 data 6 3-26, 13-7, 13-70 can0 message slot 10 data 7 3-26, 13-7, 13-71 can0 message slot 10 data length register 3-26, 13-7, 13-63 can0 message slot 10 extended id 0 3-26, 13-7, 13-60 can0 message slot 10 extended id 1 3-26, 13-7, 13-61 can0 message slot 10 extended id 2 3-26, 13-7, 13-62 can0 message slot 10 standard id 0 3-26, 13-7, 13-58 can0 message slot 10 standard id 1 3-26, 13-7, 13-59 can0 message slot 10 timestamp 3-26, 13-7, 13-72 can0 message slot 11 control register 3-23, 13-5, 13-54 can0 message slot 11 data 0 3-26, 13-8, 13-64 can0 message slot 11 data 1 3-26, 13-8, 13-65 can0 message slot 11 data 2 3-26, 13-8, 13-66 can0 message slot 11 data 3 3-26, 13-8, 13-67 can0 message slot 11 data 4 3-26, 13-8, 13-68 can0 message slot 11 data 5 3-26, 13-8, 13-69 can0 message slot 11 data 6 3-26, 13-8, 13-70 can0 message slot 11 data 7 3-26, 13-8, 13-71 can0 message slot 11 data length register 3-26, 13-8, 13-63 can0 message slot 11 extended id 0 3-26, 13-8, 13-60 can0 message slot 11 extended id 1 3-26, 13-8, 13-61 can0 message slot 11 extended id 2 3-26, 13-8, 13-62 can0 message slot 11 standard id 0 3-26, 13-8, 13-58 can0 message slot 11 standard id 1 3-26, 13-8, 13-59 can0 message slot 11 timestamp 3-26, 13-8, 13-72 can0 message slot 12 control register 3-23, 13-5, 13-54 can0 message slot 12 data 0 3-26, 13-8, 13-64 can0 message slot 12 data 1 3-26, 13-8, 13-65 can0 message slot 12 data 2 3-26, 13-8, 13-66 can0 message slot 12 data 3 3-26, 13-8, 13-67 can0 message slot 12 data 4 3-26, 13-8, 13-68 can0 message slot 12 data 5 3-26, 13-8, 13-69 can0 message slot 12 data 6 3-26, 13-8, 13-70 can0 message slot 12 data 7 3-26, 13-8, 13-71 can0 message slot 12 data length register 3-26, 13-8, 13-63 can0 message slot 12 extended id 0 3-26, 13-8, 13-60 can0 message slot 12 extended id 1 3-26, 13-8, 13-61 can0 message slot 12 extended id 2 3-26, 13-8, 13-62 can0 message slot 12 standard id 0 3-26, 13-8, 13-58 can0 message slot 12 standard id 1 3-26, 13-8, 13-59 can0 message slot 12 timestamp 3-26, 13-8, 13-72 can0 message slot 13 control register 3-23, 13-5, 13-54 can0 message slot 13 data 0 3-26, 13-8, 13-64 can0 message slot 13 data 1 3-26, 13-8, 13-65 can0 message slot 13 data 2 3-26, 13-8, 13-66 can0 message slot 13 data 3 3-26, 13-8, 13-67 can0 message slot 13 data 4 3-26, 13-8, 13-68 can0 message slot 13 data 5 3-26, 13-8, 13-69 can0 message slot 13 data 6 3-26, 13-8, 13-70 can0 message slot 13 data 7 3-26, 13-8, 13-71 can0 message slot 13 data length register 3-26, 13-8, 13-63 can0 message slot 13 extended id 0 3-26, 13-8, 13-60 can0 message slot 13 extended id 1 3-26, 13-8, 13-61 can0 message slot 13 extended id 2 3-26, 13-8, 13-62 can0 message slot 13 standard id 0 3-26, 13-8, 13-58 can0 message slot 13 standard id 1 3-26, 13-8, 13-59 can0 message slot 13 timestamp 3-26, 13-8, 13-72 can0 message slot 14 control register 3-23, 13-5, 13-54 can0 message slot 14 data 0 3-27, 13-8, 13-64 can0 message slot 14 data 1 3-27, 13-8, 13-65 can0 message slot 14 data 2 3-27, 13-8, 13-66 can0 message slot 14 data 3 3-27, 13-8, 13-67 can0 message slot 14 data 4 3-27, 13-8, 13-68 can0 message slot 14 data 5 3-27, 13-8, 13-69
sfr index index-11 32176 group user?s manual (rev.1.01) can0 message slot 14 data 6 3-27, 13-8, 13-70 can0 message slot 14 data 7 3-27, 13-8, 13-71 can0 message slot 14 data length register 3-27, 13-8, 13-63 can0 message slot 14 extended id 0 3-27, 13-8, 13-60 can0 message slot 14 extended id 1 3-27, 13-8, 13-61 can0 message slot 14 extended id 2 3-27, 13-8, 13-62 can0 message slot 14 standard id 0 3-27, 13-8, 13-58 can0 message slot 14 standard id 1 3-27, 13-8, 13-59 can0 message slot 14 timestamp 3-27, 13-8, 13-72 can0 message slot 15 control register 3-23, 13-5, 13-54 can0 message slot 15 data 0 3-27, 13-9, 13-64 can0 message slot 15 data 1 3-27, 13-9, 13-65 can0 message slot 15 data 2 3-27, 13-9, 13-66 can0 message slot 15 data 3 3-27, 13-9, 13-67 can0 message slot 15 data 4 3-27, 13-9, 13-68 can0 message slot 15 data 5 3-27, 13-9, 13-69 can0 message slot 15 data 6 3-27, 13-9, 13-70 can0 message slot 15 data 7 3-27, 13-9, 13-71 can0 message slot 15 data length register 3-27, 13-9, 13-63 can0 message slot 15 extended id 0 3-27, 13-9, 13-60 can0 message slot 15 extended id 1 3-27, 13-9, 13-61 can0 message slot 15 extended id 2 3-27, 13-9, 13-62 can0 message slot 15 standard id 0 3-27, 13-9, 13-58 can0 message slot 15 standard id 1 3-27, 13-9, 13-59 can0 message slot 15 timestamp 3-27, 13-9, 13-72 can0 mode register 3-22, 13-4, 13-47 can0 receive error count register 3-22, 13-4, 13-25 can0 single-shot interrupt request mask register 3-23, 13-5, 13-34 can0 single-shot interrupt request status register 3-23, 13-4, 13-33 can0 single-shot mode control register 3-23, 13-4, 13-53 can0 slot interrupt request mask register 3-22, 13-4, 13-30 can0 slot interrupt request status register 3-22, 13-4, 13-29 can0 status register 3-22, 13-4, 13-18 can0 timestamp count register 3-22, 13-4, 13-24 can0 transmit error count register 3-22, 13-4, 13-25 can0 transmit/receive & error interrupt control register 3-11, 5-4, 5-8 can0brp 3-22, 13-4, 13-26 can0cnt 3-22, 13-4, 13-15 can0conf 3-22, 13-4, 13-22 can0dmarq 3-22, 13-4, 13-48 can0ef 3-22, 13-4, 13-45 can0erimk 3-22, 13-4, 13-32 can0erist 3-22, 13-4, 13-31 can0extid 3-22, 13-4, 13-21 can0mod 3-22, 13-4, 13-47 can0rec 3-22, 13-4, 13-25 can0slimk 3-22, 13-4, 13-30 can0slist 3-22, 13-4, 13-29 can0ssimk 3-23, 13-5, 13-34 can0ssist 3-23, 13-4, 13-33 can0ssmode 3-23, 13-4, 13-53 can0stat 3-22, 13-4, 13-18 can0tec 3-22, 13-4, 13-25 can0tstmp 3-22, 13-4, 13-24 can1 baud rate prescaler 3-27, 13-9, 13-26 can1 cause of error register 3-27, 13-9, 13-45 can1 configuration register 3-27, 13-9, 13-22 can1 control register 3-27, 13-9, 13-15 can1 dma transfer request select register 3-27, 13-9, 13-48 can1 error interrupt request mask register 3-27, 13-9, 13-32 can1 error interrupt request status register 3-27, 13-9, 13-31 can1 extended id register 3-27, 13-9, 13-21 can1 global mask register extended id 0 3-27, 13-9, 13-50 can1 global mask register extended id 1 3-27, 13-9, 13-50 can1 global mask register extended id 2 3-27, 13-9, 13-51 can1 global mask register standard id 0 3-27, 13-9, 13-49 can1 global mask register standard id 1 3-27, 13-9, 13-49 can1 local mask register a extended id0 3-28, 13-9, 13-50 can1 local mask register a extended id1 3-28, 13-9, 13-50 can1 local mask register a extended id2 3-28, 13-9, 13-51 can1 local mask register a standard id0 3-28, 13-9, 13-49 can1 local mask register a standard id1 3-28, 13-9, 13-49 can1 local mask register b extended id0 3-28, 13-9, 13-50 can1 local mask register b extended id1 3-28, 13-9, 13-50 can1 local mask register b extended id2 3-28, 13-9, 13-51 can1 local mask register b standard id0 3-28, 13-9, 13-49 can1 local mask register b standard id1 3-28, 13-9, 13-49 can1 message slot 0 control register 3-28, 13-10, 13-54 can1 message slot 0 data 0 3-28, 13-10, 13-64 can1 message slot 0 data 1 3-28, 13-10, 13-65 can1 message slot 0 data 2 3-28, 13-10, 13-66 can1 message slot 0 data 3 3-28, 13-10, 13-67 can1 message slot 0 data 4 3-28, 13-10, 13-68 can1 message slot 0 data 5 3-28, 13-10, 13-69 can1 message slot 0 data 6 3-28, 13-10, 13-70 can1 message slot 0 data 7 3-28, 13-10, 13-71 can1 message slot 0 data length register 3-28, 13-10, 13-63 can1 message slot 0 extended id 0 3-28, 13-10, 13-60 can1 message slot 0 extended id 1 3-28, 13-10, 13-61 can1 message slot 0 extended id 2 3-28, 13-10, 13-62 can1 message slot 0 standard id 0 3-28, 13-10, 13-58 can1 message slot 0 standard id 1 3-28, 13-10, 13-59 can1 message slot 0 timestamp 3-28, 13-10, 13-72 can1 message slot 1 control register 3-28, 13-10, 13-54 can1 message slot 1 data 0 3-29, 13-10, 13-64 can1 message slot 1 data 1 3-29, 13-10, 13-65 can1 message slot 1 data 2 3-29, 13-10, 13-66 can1 message slot 1 data 3 3-29, 13-10, 13-67 can1 message slot 1 data 4 3-29, 13-10, 13-68 can1 message slot 1 data 5 3-29, 13-10, 13-69 can1 message slot 1 data 6 3-29, 13-10, 13-70 can1 message slot 1 data 7 3-29, 13-10, 13-71 can1 message slot 1 data length register 3-29, 13-10, 13-63 can1 message slot 1 extended id0 3-29, 13-10, 13-60 can1 message slot 1 extended id1 3-29, 13-10, 13-61 can1 message slot 1 extended id2 3-29, 13-10, 13-62 can1 message slot 1 standard id0 3-29, 13-10, 13-58 can1 message slot 1 standard id1 3-29, 13-10, 13-59
index-12 sfr index 32176 group user?s manual (rev.1.01) can1 message slot 1 timestamp 3-29, 13-10, 13-72 can1 message slot 2 control register 3-28, 13-10, 13-54 can1 message slot 2 data 0 3-29, 13-11, 13-64 can1 message slot 2 data 1 3-29, 13-11, 13-65 can1 message slot 2 data 2 3-29, 13-11, 13-66 can1 message slot 2 data 3 3-29, 13-11, 13-67 can1 message slot 2 data 4 3-29, 13-11, 13-68 can1 message slot 2 data 5 3-29, 13-11, 13-69 can1 message slot 2 data 6 3-29, 13-11, 13-70 can1 message slot 2 data 7 3-29, 13-11, 13-71 can1 message slot 2 data length register 3-29, 13-11, 13-63 can1 message slot 2 extended id0 3-29, 13-11, 13-60 can1 message slot 2 extended id1 3-29, 13-11, 13-61 can1 message slot 2 extended id2 3-29, 13-11, 13-62 can1 message slot 2 standard id0 3-29, 13-11, 13-58 can1 message slot 2 standard id1 3-29, 13-11, 13-59 can1 message slot 2 timestamp 3-29, 13-11, 13-72 can1 message slot 3 control register 3-28, 13-10, 13-54 can1 message slot 3 data 0 3-29, 13-11, 13-64 can1 message slot 3 data 1 3-29, 13-11, 13-65 can1 message slot 3 data 2 3-29, 13-11, 13-66 can1 message slot 3 data 3 3-29, 13-11, 13-67 can1 message slot 3 data 4 3-29, 13-11, 13-68 can1 message slot 3 data 5 3-29, 13-11, 13-69 can1 message slot 3 data 6 3-29, 13-11, 13-70 can1 message slot 3 data 7 3-29, 13-11, 13-71 can1 message slot 3 data length register 3-29, 13-11, 13-63 can1 message slot 3 extended id0 3-29, 13-11, 13-60 can1 message slot 3 extended id1 3-29, 13-11, 13-61 can1 message slot 3 extended id2 3-29, 13-11, 13-62 can1 message slot 3 standard id0 3-29, 13-11, 13-58 can1 message slot 3 standard id1 3-29, 13-11, 13-59 can1 message slot 3 timestamp 3-29, 13-11, 13-72 can1 message slot 4 control register 3-28, 13-10, 13-54 can1 message slot 4 data 0 3-29, 13-11, 13-64 can1 message slot 4 data 1 3-29, 13-11, 13-65 can1 message slot 4 data 2 3-29, 13-11, 13-66 can1 message slot 4 data 3 3-29, 13-11, 13-67 can1 message slot 4 data 4 3-29, 13-11, 13-68 can1 message slot 4 data 5 3-29, 13-11, 13-69 can1 message slot 4 data 6 3-29, 13-11, 13-70 can1 message slot 4 data 7 3-29, 13-11, 13-71 can1 message slot 4 data length register 3-29, 13-11, 13-63 can1 message slot 4 extended id0 3-29, 13-11, 13-60 can1 message slot 4 extended id1 3-29, 13-11, 13-61 can1 message slot 4 extended id2 3-29, 13-11, 13-62 can1 message slot 4 standard id0 3-29, 13-11, 13-58 can1 message slot 4 standard id1 3-29, 13-11, 13-59 can1 message slot 4 timestamp 3-29, 13-11, 13-72 can1 message slot 5 control register 3-28, 13-10, 13-54 can1 message slot 5 data 0 3-30, 13-11, 13-64 can1 message slot 5 data 1 3-30, 13-11, 13-65 can1 message slot 5 data 2 3-30, 13-11, 13-66 can1 message slot 5 data 3 3-30, 13-11, 13-67 can1 message slot 5 data 4 3-30, 13-11, 13-68 can1 message slot 5 data 5 3-30, 13-11, 13-69 can1 message slot 5 data 6 3-30, 13-11, 13-70 can1 message slot 5 data 7 3-30, 13-11, 13-71 can1 message slot 5 data length register 3-30, 13-11, 13-63 can1 message slot 5 extended id0 3-30, 13-11, 13-60 can1 message slot 5 extended id1 3-30, 13-11, 13-61 can1 message slot 5 extended id2 3-30, 13-11, 13-62 can1 message slot 5 standard id0 3-30, 13-11, 13-58 can1 message slot 5 standard id1 3-30, 13-11, 13-59 can1 message slot 5 timestamp 3-30, 13-11, 13-72 can1 message slot 6 control register 3-28, 13-10, 13-54 can1 message slot 6 data 0 3-30, 13-12, 13-64 can1 message slot 6 data 1 3-30, 13-12, 13-65 can1 message slot 6 data 2 3-30, 13-12, 13-66 can1 message slot 6 data 3 3-30, 13-12, 13-67 can1 message slot 6 data 4 3-30, 13-12, 13-68 can1 message slot 6 data 5 3-30, 13-12, 13-69 can1 message slot 6 data 6 3-30, 13-12, 13-70 can1 message slot 6 data 7 3-30, 13-12, 13-71 can1 message slot 6 data length register 3-30, 13-12, 13-63 can1 message slot 6 extended id0 3-30, 13-12, 13-60 can1 message slot 6 extended id1 3-30, 13-12, 13-61 can1 message slot 6 extended id2 3-30, 13-12, 13-62 can1 message slot 6 standard id0 3-30, 13-12, 13-58 can1 message slot 6 standard id1 3-30, 13-12, 13-59 can1 message slot 6 timestamp 3-30, 13-12, 13-72 can1 message slot 7 control register 3-28, 13-10, 13-54 can1 message slot 7 data 0 3-30, 13-12, 13-64 can1 message slot 7 data 1 3-30, 13-12, 13-65 can1 message slot 7 data 2 3-30, 13-12, 13-66 can1 message slot 7 data 3 3-30, 13-12, 13-67 can1 message slot 7 data 4 3-30, 13-12, 13-68 can1 message slot 7 data 5 3-30, 13-12, 13-69 can1 message slot 7 data 6 3-30, 13-12, 13-70 can1 message slot 7 data 7 3-30, 13-12, 13-71 can1 message slot 7 data length register 3-30, 13-12, 13-63 can1 message slot 7 extended id0 3-30, 13-12, 13-60 can1 message slot 7 extended id1 3-30, 13-12, 13-61 can1 message slot 7 extended id2 3-30, 13-12, 13-62 can1 message slot 7 standard id0 3-30, 13-12, 13-58 can1 message slot 7 standard id1 3-30, 13-12, 13-59 can1 message slot 7 timestamp 3-30, 13-12, 13-72 can1 message slot 8 control register 3-28, 13-10, 13-54 can1 message slot 8 data 0 3-30, 13-12, 13-64 can1 message slot 8 data 1 3-30, 13-12, 13-65 can1 message slot 8 data 2 3-30, 13-12, 13-66 can1 message slot 8 data 3 3-30, 13-12, 13-67 can1 message slot 8 data 4 3-30, 13-12, 13-68 can1 message slot 8 data 5 3-30, 13-12, 13-69 can1 message slot 8 data 6 3-30, 13-12, 13-70 can1 message slot 8 data 7 3-30, 13-12, 13-71 can1 message slot 8 data length register 3-30, 13-12, 13-63 can1 message slot 8 extended id0 3-30, 13-12, 13-60
sfr index index-13 32176 group user?s manual (rev.1.01) can1 message slot 8 extended id1 3-30, 13-12, 13-61 can1 message slot 8 extended id2 3-30, 13-12, 13-62 can1 message slot 8 standard id0 3-30, 13-12, 13-58 can1 message slot 8 standard id1 3-30, 13-12, 13-59 can1 message slot 8 timestamp 3-30, 13-12, 13-72 can1 message slot 9 control register 3-28, 13-10, 13-54 can1 message slot 9 data 0 3-31, 13-12, 13-64 can1 message slot 9 data 1 3-31, 13-12, 13-65 can1 message slot 9 data 2 3-31, 13-12, 13-66 can1 message slot 9 data 3 3-31, 13-12, 13-67 can1 message slot 9 data 4 3-31, 13-12, 13-68 can1 message slot 9 data 5 3-31, 13-12, 13-69 can1 message slot 9 data 6 3-31, 13-12, 13-70 can1 message slot 9 data 7 3-31, 13-12, 13-71 can1 message slot 9 data length register 3-31, 13-12, 13-63 can1 message slot 9 extended id0 3-31, 13-12, 13-60 can1 message slot 9 extended id1 3-31, 13-12, 13-61 can1 message slot 9 extended id2 3-31, 13-12, 13-62 can1 message slot 9 standard id0 3-31, 13-12, 13-58 can1 message slot 9 standard id1 3-31, 13-12, 13-59 can1 message slot 9 timestamp 3-31, 13-12, 13-72 can1 message slot 10 control register 3-28, 13-10, 13-54 can1 message slot 10 data 0 3-31, 13-13, 13-64 can1 message slot 10 data 1 3-31, 13-13, 13-65 can1 message slot 10 data 2 3-31, 13-13, 13-66 can1 message slot 10 data 3 3-31, 13-13, 13-67 can1 message slot 10 data 4 3-31, 13-13, 13-68 can1 message slot 10 data 5 3-31, 13-13, 13-69 can1 message slot 10 data 6 3-31, 13-13, 13-70 can1 message slot 10 data 7 3-31, 13-13, 13-71 can1 message slot 10 data length register 3-31, 13-13, 13-63 can1 message slot 10 extended id 0 3-31, 13-13, 13-60 can1 message slot 10 extended id 1 3-31, 13-13, 13-61 can1 message slot 10 extended id 2 3-31, 13-13, 13-62 can1 message slot 10 standard id 0 3-31, 13-13, 13-58 can1 message slot 10 standard id 1 3-31, 13-13, 13-59 can1 message slot 10 timestamp 3-31, 13-13, 13-72 can1 message slot 11 control register 3-28, 13-10, 13-54 can1 message slot 11 data 0 3-31, 13-13, 13-64 can1 message slot 11 data 1 3-31, 13-13, 13-65 can1 message slot 11 data 2 3-31, 13-13, 13-66 can1 message slot 11 data 3 3-31, 13-13, 13-67 can1 message slot 11 data 4 3-31, 13-13, 13-68 can1 message slot 11 data 5 3-31, 13-13, 13-69 can1 message slot 11 data 6 3-31, 13-13, 13-70 can1 message slot 11 data 7 3-31, 13-13, 13-71 can1 message slot 11 data length register 3-31, 13-13, 13-63 can1 message slot 11 extended id 0 3-31, 13-13, 13-60 can1 message slot 11 extended id 1 3-31, 13-13, 13-61 can1 message slot 11 extended id 2 3-31, 13-13, 13-62 can1 message slot 11 standard id 0 3-31, 13-13, 13-58 can1 message slot 11 standard id 1 3-31, 13-13, 13-59 can1 message slot 11 timestamp 3-31, 13-13, 13-72 can1 message slot 12 control register 3-28, 13-10, 13-54 can1 message slot 12 data 0 3-31, 13-13, 13-64 can1 message slot 12 data 1 3-31, 13-13, 13-65 can1 message slot 12 data 2 3-31, 13-13, 13-66 can1 message slot 12 data 3 3-31, 13-13, 13-67 can1 message slot 12 data 4 3-31, 13-13, 13-68 can1 message slot 12 data 5 3-31, 13-13, 13-69 can1 message slot 12 data 6 3-31, 13-13, 13-70 can1 message slot 12 data 7 3-31, 13-13, 13-71 can1 message slot 12 data length register 3-31, 13-13, 13-63 can1 message slot 12 extended id 0 3-31, 13-13, 13-60 can1 message slot 12 extended id 1 3-31, 13-13, 13-61 can1 message slot 12 extended id 2 3-31, 13-13, 13-62 can1 message slot 12 standard id 0 3-31, 13-13, 13-58 can1 message slot 12 standard id 1 3-31, 13-13, 13-59 can1 message slot 12 timestamp 3-31, 13-13, 13-72 can1 message slot 13 control register 3-28, 13-10, 13-54 can1 message slot 13 data 0 3-32, 13-13, 13-64 can1 message slot 13 data 1 3-32, 13-13, 13-65 can1 message slot 13 data 2 3-32, 13-13, 13-66 can1 message slot 13 data 3 3-32, 13-13, 13-67 can1 message slot 13 data 4 3-32, 13-13, 13-68 can1 message slot 13 data 5 3-32, 13-13, 13-69 can1 message slot 13 data 6 3-32, 13-13, 13-70 can1 message slot 13 data 7 3-32, 13-13, 13-71 can1 message slot 13 data length register 3-32, 13-13, 13-63 can1 message slot 13 extended id 0 3-32, 13-13, 13-60 can1 message slot 13 extended id 1 3-32, 13-13, 13-61 can1 message slot 13 extended id 2 3-32, 13-13, 13-62 can1 message slot 13 standard id 0 3-32, 13-13, 13-58 can1 message slot 13 standard id 1 3-32, 13-13, 13-59 can1 message slot 13 timestamp 3-32, 13-13, 13-72 can1 message slot 14 control register 3-28, 13-10, 13-54 can1 message slot 14 data 0 3-32, 13-14, 13-64 can1 message slot 14 data 1 3-32, 13-14, 13-65 can1 message slot 14 data 2 3-32, 13-14, 13-66 can1 message slot 14 data 3 3-32, 13-14, 13-67 can1 message slot 14 data 4 3-32, 13-14, 13-68 can1 message slot 14 data 5 3-32, 13-14, 13-69 can1 message slot 14 data 6 3-32, 13-14, 13-70 can1 message slot 14 data 7 3-32, 13-14, 13-71 can1 message slot 14 data length register 3-32, 13-14, 13-63 can1 message slot 14 extended id 0 3-32, 13-14, 13-60 can1 message slot 14 extended id 1 3-32, 13-14, 13-61 can1 message slot 14 extended id 2 3-32, 13-14, 13-62 can1 message slot 14 standard id 0 3-32, 13-14, 13-58 can1 message slot 14 standard id 1 3-32, 13-14, 13-59 can1 message slot 14 timestamp 3-32, 13-14, 13-72 can1 message slot 15 control register 3-28, 13-10, 13-54 can1 message slot 15 data 0 3-32, 13-14, 13-64 can1 message slot 15 data 1 3-32, 13-14, 13-65 can1 message slot 15 data 2 3-32, 13-14, 13-66 can1 message slot 15 data 3 3-32, 13-14, 13-67 can1 message slot 15 data 4 3-32, 13-14, 13-68 can1 message slot 15 data 5 3-32, 13-14, 13-69
index-14 sfr index 32176 group user?s manual (rev.1.01) can1 message slot 15 data 6 3-32, 13-14, 13-70 can1 message slot 15 data 7 3-32, 13-14, 13-71 can1 message slot 15 data length register 3-32, 13-14, 13-63 can1 message slot 15 extended id 0 3-32, 13-14, 13-60 can1 message slot 15 extended id 1 3-32, 13-14, 13-61 can1 message slot 15 extended id 2 3-32, 13-14, 13-62 can1 message slot 15 standard id0 3-32, 13-14, 13-58 can1 message slot 15 standard id1 3-32, 13-14, 13-59 can1 message slot 15 timestamp 3-32, 13-14, 13-72 can1 mode register 3-27, 13-9, 13-47 can1 receive error count register 3-27, 13-9, 13-25 can1 single-shot interrupt request mask register 3-28, 13-10, 13-34 can1 single-shot interrupt request status register 3-28, 13-10, 13-33 can1 single-shot mode control register 3-28, 13-10, 13-53 can1 slot interrupt request mask register 3-27, 13-9, 13-30 can1 slot interrupt request status register 3-27, 13-9, 13-29 can1 status register 3-27, 13-9, 13-18 can1 timestamp count register 3-27, 13-9, 13-24 can1 transmit error count register 3-27, 13-9, 13-25 can1 transmit/receive & error interrupt control register 3-11, 5-4, 5-8 can1brp 3-27, 13-9, 13-26 can1cnt 3-27, 13-9, 13-15 can1conf 3-27, 13-9, 13-22 can1dmarq 3-27, 13-9, 13-48 can1ef 3-27, 13-9, 13-45 can1erimk 3-27, 13-9, 13-32 can1erist 3-27, 13-9, 13-31 can1extid 3-27, 13-9, 13-21 can1mod 3-27, 13-9, 13-47 can1rec 3-27, 13-9, 13-25 can1slimk 3-27, 13-9, 13-30 can1slist 3-27, 13-9, 13-29 can1ssimk 3-28, 13-10, 13-34 can1ssist 3-28, 13-10, 13-33 can1ssmode 3-28, 13-10, 13-53 can1stat 3-27, 13-9, 13-18 can1tec 3-27, 13-9, 13-25 can1tstmp 3-27, 13-9, 13-24 cbs 13-18 cdiv 12-13 cdmsel0 13-48 cdmsel1 13-48 channel 0 disconnection detection assist method select bit 11-24 channel 1 disconnection detection assist method select bit 11-24 channel 2 disconnection detection assist method select bit 11-24 channel 3 disconnection detection assist method select bit 11-24 channel 4 disconnection detection assist method select bit 11-24 channel 5 disconnection detection assist method select bit 11-24 channel 6 disconnection detection assist method select bit 11-24 channel 7 disconnection detection assist method select bit 11-24 channel 8 disconnection detection assist method select bit 11-24 channel 9 disconnection detection assist method select bit 11-24 channel 11 disconnection detection assist method select bit 11-24 channel 12 disconnection detection assist method select bit 11-24 channel 13 disconnection detection assist method select bit 11-24 channel 14 disconnection detection assist method select bit 11-24 channel 15 disconnection detection assist method select bit 11-24 ckb2s 10-13 ckiebcr 3-13, 10-8, 10-13 ckpol 12-24 cks 12-15 clkcr 3-21, 18-5 clock bus & input event bus control register 3-13, 10-8, 10-13 clock bus 2 input select bit 10-13 clock control register 3-21, 18-5 cmod 13-47 crc error detection bit 13-45 crce 13-45 crs 13-18 cs0 wait cycles select bit 16-4 cs0wtc 16-4 cs1 wait cycles select bit 16-4 cs1wtc 16-4 d dadsl0 9-6 dadsl1 9-6 dadsl2 9-7 dadsl3 9-7 dadsl4 9-8 dadsl5 9-8 dadsl6 9-9 dadsl7 9-9 dadsl8 9-10 dadsl9 9-10 data length setting bit 13-63 dlc0 13-63 dlc1 13-63 dlc2 13-63 dlc3 13-63 dm04itmk 3-18, 9-4, 9-19 dm04itst 3-18, 9-4, 9-18 dm0cnt 3-18, 9-4, 9-6 dm0da 3-18, 9-4, 9-14 dm0sa 3-18, 9-4, 9-13 dm0sri 3-19, 9-5, 9-12 dm0tct 3-18, 9-4, 9-15 dm1cnt 3-19, 9-4, 9-6 dm1da 3-19, 9-4, 9-14 dm1sa 3-19, 9-4, 9-13 dm1sri 3-19, 9-5, 9-12 dm1tct 3-19, 9-4, 9-15 dm2cnt 3-19, 9-4, 9-7 dm2da 3-19, 9-4, 9-14 dm2sa 3-19, 9-4, 9-13 dm2sri 3-20, 9-5, 9-12 dm2tct 3-19, 9-4, 9-15 dm3cnt 3-19, 9-5, 9-7
sfr index index-15 32176 group user?s manual (rev.1.01) dm3da 3-19, 9-5, 9-14 dm3sa 3-19, 9-5, 9-13 dm3sri 3-20, 9-5, 9-12 dm3tct 3-19, 9-5, 9-15 dm4cnt 3-19, 9-5, 9-8 dm4da 3-19, 9-5, 9-14 dm4sa 3-19, 9-5, 9-13 dm4sri 3-20, 9-5, 9-12 dm4tct 3-19, 9-5, 9-15 dm59itmk 3-18, 9-4, 9-19 dm59itst 3-18, 9-4, 9-18 dm5cnt 3-18, 9-4, 9-8 dm5da 3-18, 9-4, 9-14 dm5sa 3-18, 9-4, 9-13 dm5sri 3-20, 9-5, 9-12 dm5tct 3-18, 9-4, 9-15 dm6cnt 3-19, 9-4, 9-9 dm6da 3-19, 9-4, 9-14 dm6sa 3-19, 9-4, 9-13 dm6sri 3-20, 9-5, 9-12 dm6tct 3-19, 9-4, 9-15 dm7cnt 3-19, 9-4, 9-9 dm7da 3-19, 9-4, 9-14 dm7sa 3-19, 9-4, 9-13 dm7sri 3-20, 9-5, 9-12 dm7tct 3-19, 9-4, 9-15 dm8cnt 3-19, 9-5, 9-10 dm8da 3-19, 9-5, 9-14 dm8sa 3-19, 9-5, 9-13 dm8sri 3-20, 9-5, 9-12 dm8tct 3-19, 9-5, 9-15 dm9cnt 3-19, 9-5, 9-10 dm9da 3-19, 9-5, 9-14 dm9sa 3-19, 9-5, 9-13 dm9sri 3-20, 9-5, 9-12 dm9tct 3-19, 9-5, 9-15 dma0 channel control register 3-18, 9-4, 9-6 dma0 destination address direction select bit 9-6 dma0 destination address register 3-18, 9-4, 9-14 dma0 interrupt request mask bit 9-19 dma0 interrupt request status bit 9-18 dma0 request source select bit 9-6 dma0 software request generation register 3-19, 9-5, 9-12 dma0 source address direction select bit 9-6 dma0 source address register 3-18, 9-4, 9-13 dma0 transfer count register 3-18, 9-4, 9-15 dma0 transfer enable bit 9-6 dma0 transfer mode select bit 9-6 dma0 transfer request flag bit 9-6 dma0 transfer size select bit 9-6 dma0?4 interrupt control register 3-11, 5-4, 5-8 dma0?4 interrupt request mask register 3-18, 9-4, 9-19 dma0?4 interrupt request status register 3-18, 9-4, 9-18 dma1 channel control register 3-19, 9-4, 9-6 dma1 destination address direction select bit 9-6 dma1 destination address register 3-19, 9-4, 9-14 dma1 interrupt request mask bit 9-19 dma1 interrupt request status bit 9-18 dma1 request source select bit 9-6 dma1 software request generation register 3-19, 9-5, 9-12 dma1 source address direction select bit 9-6 dma1 source address register 3-19, 9-4, 9-13 dma1 transfer count register 3-19, 9-4, 9-15 dma1 transfer enable bit 9-6 dma1 transfer mode select bit 9-6 dma1 transfer request flag bit 9-6 dma1 transfer size select bit 9-6 dma2 channel control register 3-19, 9-4, 9-7 dma2 destination address direction select bit 9-7 dma2 destination address register 3-19, 9-4, 9-14 dma2 interrupt request mask bit 9-19 dma2 interrupt request status bit 9-18 dma2 request source select bit 9-7 dma2 software request generation register 3-20, 9-5, 9-12 dma2 source address direction select bit 9-7 dma2 source address register 3-19, 9-4, 9-13 dma2 transfer count register 3-19, 9-4, 9-15 dma2 transfer enable bit 9-7 dma2 transfer mode select bit 9-7 dma2 transfer request flag bit 9-7 dma2 transfer size select bit 9-7 dma3 channel control register 3-19, 9-5, 9-7 dma3 destination address direction select bit 9-7 dma3 destination address register 3-19, 9-5, 9-14 dma3 interrupt request mask bit 9-19 dma3 interrupt request status bit 9-18 dma3 request source select bit 9-7 dma3 software request generation register 3-20, 9-5, 9-12 dma3 source address direction select bit 9-7 dma3 source address register 3-19, 9-5, 9-13 dma3 transfer count register 3-19, 9-5, 9-15 dma3 transfer enable bit 9-7 dma3 transfer mode select bit 9-7 dma3 transfer request flag bit 9-7 dma3 transfer size select bit 9-7 dma4 channel control register 3-19, 9-5, 9-8 dma4 destination address direction select bit 9-8 dma4 destination address register 3-19, 9-5, 9-14 dma4 interrupt request mask bit 9-19 dma4 interrupt request status bit 9-18 dma4 request source select bit 9-8 dma4 software request generation register 3-20, 9-5, 9-12 dma4 source address direction select bit 9-8 dma4 source address register 3-19, 9-5, 9-13 dma4 transfer count register 3-19, 9-5, 9-15 dma4 transfer enable bit 9-8 dma4 transfer mode select bit 9-8 dma4 transfer request flag bit 9-8
index-16 sfr index 32176 group user?s manual (rev.1.01) dma4 transfer size select bit 9-8 dma5 channel control register 3-18, 9-4, 9-8 dma5 destination address direction select bit 9-8 dma5 destination address register 3-18, 9-4, 9-14 dma5 interrupt request mask bit 9-19 dma5 interrupt request status bit 9-18 dma5 request source select bit 9-8 dma5 software request generation register 3-20, 9-5, 9-12 dma5 source address direction select bit 9-8 dma5 source address register 3-18, 9-4, 9-13 dma5 transfer count register 3-18, 9-4, 9-15 dma5 transfer enable bit 9-8 dma5 transfer mode select bit 9-8 dma5 transfer request flag bit 9-8 dma5 transfer size select bit 9-8 dma5-9 interrupt control register 3-11, 5-4, 5-8 dma5-9 interrupt request mask register 3-18, 9-4, 9-19 dma5-9 interrupt request status register 3-18, 9-4, 9-18 dma6 channel control register 3-19, 9-4, 9-9 dma6 destination address direction select bit 9-9 dma6 destination address register 3-19, 9-4, 9-14 dma6 interrupt request mask bit 9-19 dma6 interrupt request status bit 9-18 dma6 request source select bit 9-9 dma6 software request generation register 3-20, 9-5, 9-12 dma6 source address direction select bit 9-9 dma6 source address register 3-19, 9-4, 9-13 dma6 transfer count register 3-19, 9-4, 9-15 dma6 transfer enable bit 9-9 dma6 transfer mode select bit 9-9 dma6 transfer request flag bit 9-9 dma6 transfer size select bit 9-9 dma7 channel control register 3-19, 9-4, 9-9 dma7 destination address direction select bit 9-9 dma7 destination address register 3-19, 9-4, 9-14 dma7 interrupt request mask bit 9-19 dma7 interrupt request status bit 9-18 dma7 request source select bit 9-9 dma7 software request generation register 3-20, 9-5, 9-12 dma7 source address direction select bit 9-9 dma7 source address register 3-19, 9-4, 9-13 dma7 transfer count register 3-19, 9-4, 9-15 dma7 transfer enable bit 9-9 dma7 transfer mode select bit 9-9 dma7 transfer request flag bit 9-9 dma7 transfer size select bit 9-9 dma8 channel control register 3-19, 9-5, 9-10 dma8 destination address direction select bit 9-10 dma8 destination address register 3-19, 9-5, 9-14 dma8 interrupt request mask bit 9-19 dma8 interrupt request status bit 9-18 dma8 request source select bit 9-10 dma8 software request generation register 3-20, 9-5, 9-12 dma8 source address direction select bit 9-10 dma8 source address register 3-19, 9-5, 9-13 dma8 transfer count register 3-19, 9-5, 9-15 dma8 transfer enable bit 9-10 dma8 transfer mode select bit 9-10 dma8 transfer request flag bit 9-10 dma8 transfer size select bit 9-10 dma9 channel control register 3-19, 9-5, 9-10 dma9 destination address direction select bit 9-10 dma9 destination address register 3-19, 9-5, 9-14 dma9 interrupt request mask bit 9-19 dma9 interrupt request status bit 9-18 dma9 request source select bit 9-10 dma9 software request generation register 3-20, 9-5, 9-12 dma9 source address direction select bit 9-10 dma9 source address register 3-19, 9-5, 9-13 dma9 transfer count register 3-19, 9-5, 9-15 dma9 transfer enable bit 9-10 dma9 transfer mode select bit 9-10 dma9 transfer request flag bit 9-10 dma9 transfer size select bit 9-10 dmitmk0 9-19 dmitmk1 9-19 dmitmk2 9-19 dmitmk3 9-19 dmitmk4 9-19 dmitmk5 9-19 dmitmk6 9-19 dmitmk7 9-19 dmitmk8 9-19 dmitmk9 9-19 dmitst0 9-18 dmitst1 9-18 dmitst2 9-18 dmitst3 9-18 dmitst4 9-18 dmitst5 9-18 dmitst6 9-18 dmitst7 9-18 dmitst8 9-18 dmitst9 9-18 e eid0 13-60 eid0m 13-50 eid1 13-60 eid10 13-61 eid10m 13-50 eid11 13-61 eid11m 13-50 eid12 13-62 eid12m 13-51 eid13 13-62 eid13m 13-51 eid14 13-62
sfr index index-17 32176 group user?s manual (rev.1.01) eid14m 13-51 eid15 13-62 eid15m 13-51 eid16 13-62 eid16m 13-51 eid17 13-62 eid17m 13-51 eid1m 13-50 eid2 13-60 eid2m 13-50 eid3 13-60 eid3m 13-50 eid4 13-61 eid4m 13-50 eid5 13-61 eid5m 13-50 eid6 13-61 eid6m 13-50 eid7 13-61 eid7m 13-50 eid8 13-61 eid8m 13-50 eid9 13-61 eid9m 13-50 eim 13-32 eis 13-31 eps 13-18 erase 6-8 erase status confirmation bit 6-8 error passive interrupt request mask bit 13-32 error passive interrupt request status bit 13-31 error passive status bit 13-18 error sum bit 12-20 ers 12-20 extended id0 bit 13-60 extended id1 bit 13-60 extended id2 bit 13-60 extended id3 bit 13-60 extended id4 bit 13-61 extended id5 bit 13-61 extended id6 bit 13-61 extended id7 bit 13-61 extended id8 bit 13-61 extended id9 bit 13-61 extended id10 bit 13-61 extended id11 bit 13-61 extended id12 bit 13-62 extended id13 bit 13-62 extended id14 bit 13-62 extended id15 bit 13-62 extended id16 bit 13-62 extended id17 bit 13-62 extended mask id0 bit 13-50 extended mask id1 bit 13-50 extended mask id2 bit 13-50 extended mask id3 bit 13-50 extended mask id4 bit 13-50 extended mask id5 bit 13-50 extended mask id6 bit 13-50 extended mask id7 bit 13-50 extended mask id8 bit 13-50 extended mask id9 bit 13-50 extended mask id10 bit 13-50 extended mask id11 bit 13-50 extended mask id12 bit 13-51 extended mask id13 bit 13-51 extended mask id14 bit 13-51 extended mask id15 bit 13-51 extended mask id16 bit 13-51 extended mask id17 bit 13-51 external fp pin status bit 6-7 f f/f data register 0 3-14, 10-8, 10-24 f/f data register 1 3-14, 10-8, 10-24 f/f protect register 0 3-13, 10-8, 10-23 f/f protect register 1 3-14, 10-8, 10-23 f/f source select register 0 3-13, 10-8, 10-21 f/f source select register 1 3-13, 10-8, 10-22 f/f0 output data bit 10-24 f/f0 protect bit 10-23 f/f1 output data bit 10-24 f/f1 protect bit 10-23 f/f2 output data bit 10-24 f/f2 protect bit 10-23 f/f3 output data bit 10-24 f/f3 protect bit 10-23 f/f4 output data bit 10-24 f/f4 protect bit 10-23 f/f5 output data bit 10-24 f/f5 protect bit 10-23 f/f6 output data bit 10-24 f/f6 protect bit 10-23 f/f6 source select bit 10-21 f/f7 output data bit 10-24 f/f7 protect bit 10-23 f/f7 source select bit 10-21 f/f8 output data bit 10-24 f/f8 protect bit 10-23 f/f8 source select bit 10-21 f/f9 output data bit 10-24 f/f9 protect bit 10-23 f/f9 source select bit 10-21 f/f10 output data bit 10-24 f/f10 protect bit 10-23 f/f10 source select bit 10-21 f/f11 output data bit 10-24 f/f11 protect bit 10-23
index-18 sfr index 32176 group user?s manual (rev.1.01) f/f11 source select bit 10-21 f/f12 output data bit 10-24 f/f12 protect bit 10-23 f/f12 source select bit 10-21 f/f13 output data bit 10-24 f/f13 protect bit 10-23 f/f13 source select bit 10-21 f/f14 output data bit 10-24 f/f14 protect bit 10-23 f/f14 source select bit 10-21 f/f15 output data bit 10-24 f/f15 protect bit 10-23 f/f15 source select bit 10-21 f/f16 output data bit 10-24 f/f16 protect bit 10-23 f/f16 source select bit 10-22 f/f17 output data bit 10-24 f/f17 protect bit 10-23 f/f17 source select bit 10-22 f/f18 output data bit 10-24 f/f18 protect bit 10-23 f/f18 source select bit 10-22 f/f19 output data bit 10-24 f/f19 protect bit 10-23 f/f19 source select bit 10-22 f/f20 output data bit 10-24 f/f20 protect bit 10-23 faens 6-7 fbsyck 6-11 fbusy 6-8 fcnt1 3-21, 6-6, 6-9 fcnt2 3-21, 6-6, 6-10 fcnt3 3-21, 6-6, 6-11 fcnt4 3-21, 6-6, 6-13 fd0 10-24 fd1 10-24 fd2 10-24 fd3 10-24 fd4 10-24 fd5 10-24 fd6 10-24 fd7 10-24 fd8 10-24 fd9 10-24 fd10 10-24 fd11 10-24 fd12 10-24 fd13 10-24 fd14 10-24 fd15 10-24 fd16 10-24 fd17 10-24 fd18 10-24 fd19 10-24 fd20 10-24 felbank0 3-21, 6-6, 6-15 felbank1 3-21, 6-6, 6-15 femmod 6-9 fentry 6-9 fesbank0 3-21, 6-6, 6-16 fesbank1 3-21, 6-6, 6-16 ff6 10-21 ff7 10-21 ff8 10-21 ff9 10-21 ff10 10-21 ff11 10-21 ff12 10-21 ff13 10-21 ff14 10-21 ff15 10-21 ff16 10-22 ff17 10-22 ff18 10-22 ff19 10-22 ffd0 3-14, 10-8, 10-24 ffd1 3-14, 10-8, 10-24 ffp0 3-13, 10-8, 10-23 ffp1 3-14, 10-8, 10-23 ffs0 3-13, 10-8, 10-21 ffs1 3-13, 10-8, 10-22 flash access enable status bit 6-7 flash busy bit 6-8 flash control register 1 3-21, 6-6, 6-9 flash control register 2 3-21, 6-6, 6-10 flash control register 3 3-21, 6-6, 6-11 flash control register 4 3-21, 6-6, 6-13 flash e/w enable mode entry bit 6-9 flash mode register 3-21, 6-6, 6-7 flash reset bit 6-13 flash status register 3-21, 6-6, 6-8 flbst 6-32 flm 12-20 flocks 6-10 flockst 6-13 fmod 3-21, 6-6, 6-7 forcible reset bit 13-15 form error detection bit 13-45 forme 13-45 fp0 10-23 fp1 10-23 fp2 10-23 fp3 10-23 fp4 10-23 fp5 10-23 fp6 10-23 fp7 10-23 fp8 10-23
sfr index index-19 32176 group user?s manual (rev.1.01) fp9 10-23 fp10 10-23 fp11 10-23 fp12 10-23 fp13 10-23 fp14 10-23 fp15 10-23 fp16 10-23 fp17 10-23 fp18 10-23 fp19 10-23 fp20 10-23 fpbsyck 6-11 fpmod 6-7 fprot 6-10 framing error bit, uart mode only 12-20 freset 6-13 frst 13-15 fstat 3-21, 6-6, 6-8 g group n dual-function input select bit 8-19 group n input threshold select bit 8-19 group n port input select bit 8-19 i iad0ccr 3-11, 5-4, 5-8 ican0cr 3-11, 5-4, 5-8 ican1cr 3-11, 5-4, 5-8 ide0 13-21 ide1 13-21 ide2 13-21 ide3 13-21 ide4 13-21 ide5 13-21 ide6 13-21 ide7 13-21 ide8 13-21 ide9 13-21 ide10 13-21 ide11 13-21 ide12 13-21 ide13 13-21 ide14 13-21 ide15 13-21 idma04cr 3-11, 5-4, 5-8 idma59cr 3-11, 5-4, 5-8 ieb0s 10-13 ieb1s 10-13 ieb2s 10-13 ieb3s 10-13 ilevel 5-9 imask 3-11, 5-4, 5-6 imjticr1 3-11, 5-4, 5-8 imjticr2 3-11, 5-4, 5-8 imjticr3 3-11, 5-4, 5-8 imjticr4 3-11, 5-4, 5-8 imjtocr0 3-11, 5-4, 5-8 imjtocr1 3-11, 5-4, 5-8 imjtocr2 3-11, 5-4, 5-8 imjtocr3 3-11, 5-4, 5-8 imjtocr4 3-11, 5-4, 5-8 imjtocr5 3-11, 5-4, 5-8 imjtocr6 3-11, 5-4, 5-8 imjtocr7 3-11, 5-4, 5-8 input event bus 0 input select bit 10-13 input event bus 1 input select bit 10-13 input event bus 2 input select bit 10-13 input event bus 3 input select bit 10-13 internal/external clock select bit 12-15 interrupt priority level bits 5-9 interrupt request bit 5-9 interrupt request mask register 3-11, 5-4, 5-6 interrupt vector register 3-11, 5-4, 5-5 irb0 13-30 irb1 13-30 irb2 13-30 irb3 13-30 irb4 13-30 irb5 13-30 irb6 13-30 irb7 13-30 irb8 13-30 irb9 13-30 irb10 13-30 irb11 13-30 irb12 13-30 irb13 13-30 irb14 13-30 irb15 13-30 ireq 5-9 irqr2 12-9 irqr3 12-9 irqt2 12-9 irqt3 12-9 irtdcr 3-11, 5-4, 5-8 isio0rxcr 3-11, 5-4, 5-8 isio0txcr 3-11, 5-4, 5-8 isio1rxcr 3-11, 5-4, 5-8 isio1txcr 3-11, 5-4, 5-8 isio23cr 3-11, 5-4, 5-8 isr0 12-11 isr1 12-11 isr2 12-11 isr3 12-11 ist0 12-11 ist1 12-11 ist2 12-11
index-20 sfr index 32176 group user?s manual (rev.1.01) ist3 12-11 ivect 3-11, 5-4, 5-5 l l bank address bit 6-15 lbankad 6-15 lbm 13-15 lbs 13-18 lock bit protect control bit 6-10 lock bit read mode select bit 6-10 lock bit status bit 6-13 lock bit status register 6-32 loopback mode bit 13-15 loopback status bit 13-18 m mdsel0 9-6 mdsel1 9-6 mdsel2 9-7 mdsel3 9-7 mdsel4 9-8 mdsel5 9-8 mdsel6 9-9 mdsel7 9-9 mdsel8 9-10 mdsel9 9-10 message lost bit 13-55 message slot number bit 13-18 mjt input interrupt control register 1 3-11, 5-4, 5-8 mjt input interrupt control register 2 3-11, 5-4, 5-8 mjt input interrupt control register 3 3-11, 5-4, 5-8 mjt input interrupt control register 4 3-11, 5-4, 5-8 mjt output interrupt control register 0 3-11, 5-4, 5-8 mjt output interrupt control register 1 3-11, 5-4, 5-8 mjt output interrupt control register 2 3-11, 5-4, 5-8 mjt output interrupt control register 3 3-11, 5-4, 5-8 mjt output interrupt control register 4 3-11, 5-4, 5-8 mjt output interrupt control register 5 3-11, 5-4, 5-8 mjt output interrupt control register 6 3-11, 5-4, 5-8 mjt output interrupt control register 7 3-11, 5-4, 5-8 ml 13-55 mod0 data bit 6-24 mod0dt 6-24 mod1 data bit 6-24 mod1dt 6-24 modenl 6-15 modens 6-16 msn 13-18 o odd/even parity select bit, uart mode only 12-15 oeb0s 10-14 oeb1s 10-14 oeb2s 10-14 oeb3s 10-14 oebcr 3-13, 10-8, 10-14 oim 13-32 ois 13-31 output event bus 0 input select bit 10-14 output event bus 1 input select bit 10-14 output event bus 2 input select bit 10-14 output event bus 3 input select bit 10-14 output event bus control register 3-13, 10-8, 10-14 overrun error bit 12-20 ovr 12-20 p p0 data register 3-20, 8-5, 8-7 p0 direction register 3-20, 8-5, 8-8 p0data 3-20, 8-5, 8-7 p0dir 3-20, 8-5, 8-8 p1 data register 3-20, 8-5, 8-7 p1 direction register 3-20, 8-5, 8-8 p10 data register 3-20, 8-5, 8-7 p10 direction register 3-20, 8-5, 8-8 p10 operation mode register 3-21, 8-6, 8-10 p100mod 8-10 p101mod 8-10 p102mod 8-10 p103mod 8-10 p104mod 8-10 p105mod 8-10 p106mod 8-10 p107mod 8-10 p10data 3-20, 8-5, 8-7 p10dir 3-20, 8-5, 8-8 p10mod 3-21, 8-6, 8-10 p11 data register 3-20, 8-5, 8-7 p11 direction register 3-20, 8-5, 8-8 p11 operation mode register 3-21, 8-6, 8-11 p110mod 8-11 p111mod 8-11 p112mod 8-11 p113mod 8-11 p114mod 8-11 p115mod 8-11 p116mod 8-11 p117mod 8-11 p11data 3-20, 8-5, 8-7 p11dir 3-20, 8-5, 8-8 p11mod 3-21, 8-6, 8-11 p12 data register 3-20, 8-5, 8-7 p12 direction register 3-20, 8-5, 8-8 p12 operation mode register 3-21, 8-6, 8-11 p124mod 8-11 p125mod 8-11 p126mod 8-11 p127mod 8-11
sfr index index-21 32176 group user?s manual (rev.1.01) p12data 3-20, 8-5, 8-7 p12dir 3-20, 8-5, 8-8 p12mod 3-21, 8-6, 8-11 p13 data register 3-20, 8-5, 8-7 p13 direction register 3-20, 8-5, 8-8 p13 operation mode register 3-21, 8-6, 8-12 p130mod 8-12 p131mod 8-12 p132mod 8-12 p133mod 8-12 p134mod 8-12 p135mod 8-12 p136mod 8-12 p137mod 8-12 p13data 3-20, 8-5, 8-7 p13dir 3-20, 8-5, 8-8 p13mod 3-21, 8-6, 8-12 p15 data register 3-20, 8-5, 8-7 p15 direction register 3-20, 8-5, 8-8 p15 operation mode register 3-21, 8-6, 8-12 p150mod 8-12 p153mod 8-12 p15data 3-20, 8-5, 8-7 p15dir 3-20, 8-5, 8-8 p15mod 3-21, 8-6, 8-12 p17 data register 3-20, 8-5, 8-7 p17 direction register 3-20, 8-5, 8-8 p17 operation mode register 3-21, 8-6, 8-13 p174mod 8-13 p175mod 8-13 p17data 3-20, 8-5, 8-7 p17dir 3-20, 8-5, 8-8 p17mod 3-21, 8-6, 8-13 p1data 3-20, 8-5, 8-7 p1dir 3-20, 8-5, 8-8 p2 data register 3-20, 8-5, 8-7 p2 direction register 3-20, 8-5, 8-8 p22 data register 3-20, 8-5, 8-7 p22 direction register 3-21, 8-5, 8-8 p22 operation mode register 3-21, 8-6, 8-13 p220mod 8-13 p22data 3-20, 8-5, 8-7 p22dir 3-21, 8-5, 8-8 p22mod 3-21, 8-6, 8-13 p2data 3-20, 8-5, 8-7 p2dir 3-20, 8-5, 8-8 p3 data register 3-20, 8-5, 8-7 p3 direction register 3-20, 8-5, 8-8 p3data 3-20, 8-5, 8-7 p3dir 3-20, 8-5, 8-8 p4 data register 3-20, 8-5, 8-7 p4 direction register 3-20, 8-5, 8-8 p4data 3-20, 8-5, 8-7 p4dir 3-20, 8-5, 8-8 p6 data register 3-20, 8-5, 8-7 p6 direction register 3-20, 8-5, 8-8 p6data 3-20, 8-5, 8-7 p6dir 3-20, 8-5, 8-8 p7 data register 3-20, 8-5, 8-7 p7 direction register 3-20, 8-5, 8-8 p7 operation mode register 3-21, 8-6, 8-9, 15-4, 18-7 p7 peripheral function select register 3-21, 8-6, 8-14 p70mod 8-9, 15-4, 18-7 p71mod 8-9, 15-4, 18-7 p72mod 8-9, 15-4, 18-7 p73mod 8-9, 15-4, 18-7 p74mod 8-9, 8-14, 15-4, 18-7 p75mod 8-9, 8-14, 15-4, 18-7 p76mod 8-9, 8-14, 15-4, 18-7 p77mod 8-9, 8-14, 15-4, 18-7 p7data 3-20, 8-5, 8-7 p7dir 3-20, 8-5, 8-8 p7mod 3-21, 8-6, 8-9, 15-4, 18-7 p7smod 3-21, 8-6, 8-14 p8 data register 3-20, 6-24, 8-5, 8-7 p8 direction register 3-20, 8-5, 8-8 p8 operation mode register 3-21, 8-6, 8-9 p82dt 6-24 p82mod 8-9 p83dt 6-24 p83mod 8-9 p84dt 6-24 p84mod 8-9 p85dt 6-24 p85mod 8-9 p86dt 6-24 p86mod 8-9 p87dt 6-24 p87mod 8-9 p8data 3-20, 6-24, 8-5, 8-7 p8dir 3-20, 8-5, 8-8 p8mod 3-21, 8-6, 8-9 p9 data register 3-20, 8-5, 8-7 p9 direction register 3-20, 8-5, 8-8 p9 operation mode register 3-21, 8-6, 8-10 p93mod 8-10 p94mod 8-10 p95mod 8-10 p96mod 8-10 p97mod 8-10 p9data 3-20, 8-5, 8-7 p9dir 3-20, 8-5, 8-8 p9mod 3-21, 8-6, 8-10 parity enable bit, uart mode only 12-15 parity error bit, uart mode only 12-20 pen 12-15
index-22 sfr index 32176 group user?s manual (rev.1.01) pg01lev 3-21, 8-6, 8-18 pg3lev 3-21, 8-6, 8-18 pg45lev 3-21, 8-6, 8-18 pg67lev 3-21, 8-6, 8-18 pg8lev 3-21, 8-6, 8-18 ph1 13-22 ph2 13-22 phase segment1 setting bit 13-22 phase segment2 setting bit 13-22 picnt 3-21, 8-6, 8-15, 18-3 pien0 8-15, 18-3 pim 13-32 pis 13-31 pisel 8-15, 18-3 pn0dir 8-8 pn0dt 8-7 pn1dir 8-8 pn1dt 8-7 pn2dir 8-8 pn2dt 8-7 pn3dir 8-8 pn3dt 8-7 pn4dir 8-8 pn4dt 8-7 pn5dir 8-8 pn5dt 8-7 pn6dir 8-8 pn6dt 8-7 pn7dir 8-8 pn7dt 8-7 port group 0, 1 input level setting register 3-21, 8-6, 8-18 port group 3 input level setting register 3-21, 8-6, 8-18 port group 4, 5 input level setting register 3-21, 8-6, 8-18 port group 6, 7 input level setting register 3-21, 8-6, 8-18 port group 8 input level setting register 3-21, 8-6, 8-18 port input data select bit 8-15, 18-3 port input enable bit 8-15, 18-3 port input special function control register 3-21, 8-6, 8-15, 18-3 port p70 operation mode bit 8-9, 15-4, 18-7 port p71 operation mode bit 8-9, 15-4, 18-7 port p72 operation mode bit 8-9, 15-4, 18-7 port p73 operation mode bit 8-9, 15-4, 18-7 port p74 operation mode bit 8-9, 15-4, 18-7 port p74 peripheral function select bit 8-14 port p75 operation mode bit 8-9, 15-4, 18-7 port p75 peripheral function select bit 8-14 port p76 operation mode bit 8-9, 15-4, 18-7 port p76 peripheral function select bit 8-14 port p77 operation mode bit 8-9, 15-4, 18-7 port p77 peripheral function select bit 8-14 port p82 data bit 6-24 port p82 operation mode bit 8-9 port p83 data bit 6-24 port p83 operation mode bit 8-9 port p84 data bit 6-24 port p84 operation mode bit 8-9 port p85 data bit 6-24 port p85 operation mode bit 8-9 port p86 data bit 6-24 port p86 operation mode bit 8-9 port p87 data bit 6-24 port p87 operation mode bit 8-9 port p93 operation mode bit 8-10 port p94 operation mode bit 8-10 port p95 operation mode bit 8-10 port p96 operation mode bit 8-10 port p97 operation mode bit 8-10 port p100 operation mode bit 8-10 port p101 operation mode bit 8-10 port p102 operation mode bit 8-10 port p103 operation mode bit 8-10 port p104 operation mode bit 8-10 port p105 operation mode bit 8-10 port p106 operation mode bit 8-10 port p107 operation mode bit 8-10 port p110 operation mode bit 8-11 port p111 operation mode bit 8-11 port p112 operation mode bit 8-11 port p113 operation mode bit 8-11 port p114 operation mode bit 8-11 port p115 operation mode bit 8-11 port p116 operation mode bit 8-11 port p117 operation mode bit 8-11 port p220 operation mode bit 8-13 port p124 operation mode bit 8-11 port p125 operation mode bit 8-11 port p126 operation mode bit 8-11 port p127 operation mode bit 8-11 port p130 operation mode bit 8-12 port p131 operation mode bit 8-12 port p132 operation mode bit 8-12 port p133 operation mode bit 8-12 port p134 operation mode bit 8-12 port p135 operation mode bit 8-12 port p136 operation mode bit 8-12 port p137 operation mode bit 8-12 port p150 operation mode bit 8-12 port p153 operation mode bit 8-12 port p174 operation mode bit 8-13 port p175 operation mode bit 8-13 port pn0 data bit 8-7 port pn0 direction bit 8-8 port pn1 data bit 8-7 port pn1 direction bit 8-8 port pn2 data bit 8-7 port pn2 direction bit 8-8 port pn3 data bit 8-7 port pn3 direction bit 8-8
sfr index index-23 32176 group user?s manual (rev.1.01) port pn4 data bit 8-7 port pn4 direction bit 8-8 port pn5 data bit 8-7 port pn5 direction bit 8-8 port pn6 data bit 8-7 port pn6 direction bit 8-8 port pn7 data bit 8-7 port pn7 direction bit 8-8 prb 13-22 prebusy check bit 6-11 prescaler register 0 3-13, 10-8, 10-9 prescaler register 1 3-13, 10-8, 10-9 prescaler register 2 3-13, 10-8, 10-9 propagation segment setting bit 13-22 prs0 3-13, 10-8, 10-9 prs1 3-13, 10-8, 10-9 prs2 3-13, 10-8, 10-9 psel 12-15 ptnsel 8-19 pty 12-20 r r0mask 12-10 r1mask 12-10 r2mask 12-10 r3mask 12-10 ra 13-55 rbo 13-15 rcve 13-45 receive enable bit 12-20 receive error detection bit 13-45 receive request bit 13-55 receive status bit 12-20, 13-18 reception completed status bit 13-18 reception finished bit 12-20 remote active bit 13-55 remote bit 13-55 ren 12-20 reqsl0 9-6 reqsl1 9-6 reqsl2 9-7 reqsl3 9-7 reqsl4 9-8 reqsl5 9-8 reqsl6 9-9 reqsl7 9-9 reqsl8 9-10 reqsl9 9-10 resynchronization jump width setting bit 13-22 return bus off bit 13-15 rfin 12-20 rl 13-55 rm 13-55 rr 13-55 rsb 13-18 rsc 13-18 rst 13-15 rstat 12-20 rtd interrupt control register 3-11, 5-4, 5-8 rtd write function disable register 3-21, 14-3 rtdwrdis 14-3 s s bank address bit 6-16 s0baur 3-12, 12-5, 12-23 s0mod 3-12, 12-5, 12-15 s0rcnt 3-12, 12-5, 12-20 s0rxb 3-12, 12-5, 12-19 s0smod 3-13, 12-5, 12-24 s0tcnt 3-12, 12-5, 12-13 s0txb 3-12, 12-5, 12-18 s1baur 3-13, 12-5, 12-23 s1mod 3-13, 12-5, 12-15 s1rcnt 3-13, 12-5, 12-20 s1rxb 3-13, 12-5, 12-19 s1smod 3-13, 12-5, 12-24 s1tcnt 3-13, 12-5, 12-13 s1txb 3-13, 12-5, 12-18 s2baur 3-13, 12-5, 12-23 s2mod 3-13, 12-5, 12-15 s2rcnt 3-13, 12-5, 12-20 s2rxb 3-13, 12-5, 12-19 s2tcnt 3-13, 12-5, 12-13 s2txb 3-13, 12-5, 12-18 s3baur 3-13, 12-5, 12-23 s3mod 3-13, 12-5, 12-15 s3rcnt 3-13, 12-5, 12-20 s3rxb 3-13, 12-5, 12-19 s3tcnt 3-13, 12-5, 12-13 s3txb 3-13, 12-5, 12-18 sadsl0 9-6 sadsl1 9-6 sadsl2 9-7 sadsl3 9-7 sadsl4 9-8 sadsl5 9-8 sadsl6 9-9 sadsl7 9-9 sadsl8 9-10 sadsl9 9-10 sam 13-22 sampling count select bit 13-22 sbankad 6-16 sbi (system break interrupt) control register 3-11, 5-4, 5-7 sbi request bit 5-7 sbicr 3-11, 5-4, 5-7 sbireq 5-7 sen 12-15
index-24 sfr index 32176 group user?s manual (rev.1.01) serial i/o mode select bit 12-15 si03mask 3-12, 12-5, 12-10 si03sel 3-12, 12-5, 12-11 si23stat 3-12, 12-5, 12-9 sid0 13-58 sid0m 13-49 sid1 13-58 sid1m 13-49 sid2 13-58 sid2m 13-49 sid3 13-58 sid3m 13-49 sid4 13-58 sid4m 13-49 sid5 13-59 sid5m 13-49 sid6 13-59 sid6m 13-49 sid7 13-59 sid7m 13-49 sid8 13-59 sid8m 13-49 sid9 13-59 sid9m 13-49 sid10 13-59 sid10m 13-49 sio0 baud rate register 3-12, 12-5, 12-23 sio0 receive buffer register 3-12, 12-5, 12-19 sio0 receive control register 3-12, 12-5, 12-20 sio0 receive interrupt control register 3-11, 5-4, 5-8 sio0 receive interrupt request mask bit 12-10 sio0 receive interrupt request source select bit 12-11 sio0 special mode register 3-13, 12-5, 12-24 sio0 transmit buffer register 3-12, 12-5, 12-18 sio0 transmit control register 3-12, 12-5, 12-13 sio0 transmit interrupt control register 3-11, 5-4, 5-8 sio0 transmit interrupt request mask bit 12-10 sio0 transmit interrupt request source select bit 12-11 sio0 transmit/receive mode register 3-12, 12-5, 12-15 sio03 interrupt request mask register 3-12, 12-5, 12-10 sio03 interrupt request source select register 3-12, 12-5, 12-11 sio1 baud rate register 3-13, 12-5, 12-23 sio1 receive buffer register 3-13, 12-5, 12-19 sio1 receive control register 3-13, 12-5, 12-20 sio1 receive interrupt control register 3-11, 5-4, 5-8 sio1 receive interrupt request mask bit 12-10 sio1 receive interrupt request source select bit 12-11 sio1 special mode register 3-13, 12-5, 12-24 sio1 transmit buffer register 3-13, 12-5, 12-18 sio1 transmit control register 3-13, 12-5, 12-13 sio1 transmit interrupt control register 3-11, 5-4, 5-8 sio1 transmit interrupt request mask bit 12-10 sio1 transmit interrupt request source select bit 12-11 sio1 transmit/receive mode register 3-13, 12-5, 12-15 sio2 baud rate register 3-13, 12-5, 12-23 sio2 receive buffer register 3-13, 12-5, 12-19 sio2 receive control register 3-13, 12-5, 12-20 sio2 receive interrupt request mask bit 12-10 sio2 receive interrupt request source select bit 12-11 sio2 receive interrupt request status bit 12-9 sio2 transmit buffer register 3-13, 12-5, 12-18 sio2 transmit control register 3-13, 12-5, 12-13 sio2 transmit interrupt request mask bit 12-10 sio2 transmit interrupt request source select bit 12-11 sio2 transmit interrupt request status bit 12-9 sio2 transmit/receive mode register 3-13, 12-5, 12-15 sio2, 3 transmit/receive interrupt control register 3-11, 5-4, 5-8 sio23 interrupt request status register 3-12, 12-5, 12-9 sio3 baud rate register 3-13, 12-5, 12-23 sio3 receive buffer register 3-13, 12-5, 12-19 sio3 receive control register 3-13, 12-5, 12-20 sio3 receive interrupt request mask bit 12-10 sio3 receive interrupt request source select bit 12-11 sio3 receive interrupt request status bit 12-9 sio3 transmit buffer register 3-13, 12-5, 12-18 sio3 transmit control register 3-13, 12-5, 12-13 sio3 transmit interrupt request mask bit 12-10 sio3 transmit interrupt request source select bit 12-11 sio3 transmit interrupt request status bit 12-9 sio3 transmit/receive mode register 3-13, 12-5, 12-15 sjw 13-22 sleep select bit, uart mode only 12-15 slot 0 extended format bit 13-21 slot 0 interrupt request mask bit 13-30 slot 0 interrupt request status bit 13-29 slot 0 single-shot interrupt request mask bit 13-34 slot 0 single-shot interrupt request status bit 13-33 slot 0 single-shot mode bit 13-53 slot 1 extended format bit 13-21 slot 1 interrupt request mask bit 13-30 slot 1 interrupt request status bit 13-29 slot 1 single-shot interrupt request mask bit 13-34 slot 1 single-shot interrupt request status bit 13-33 slot 1 single-shot mode bit 13-53 slot 2 extended format bit 13-21 slot 2 interrupt request mask bit 13-30 slot 2 interrupt request status bit 13-29 slot 2 single-shot interrupt request mask bit 13-34 slot 2 single-shot interrupt request status bit 13-33 slot 2 single-shot mode bit 13-53 slot 3 extended format bit 13-21 slot 3 interrupt request mask bit 13-30 slot 3 interrupt request status bit 13-29 slot 3 single-shot interrupt request mask bit 13-34 slot 3 single-shot interrupt request status bit 13-33 slot 3 single-shot mode bit 13-53 slot 4 extended format bit 13-21 slot 4 interrupt request mask bit 13-30
sfr index index-25 32176 group user?s manual (rev.1.01) slot 4 interrupt request status bit 13-29 slot 4 single-shot interrupt request mask bit 13-34 slot 4 single-shot interrupt request status bit 13-33 slot 4 single-shot mode bit 13-53 slot 5 extended format bit 13-21 slot 5 interrupt request mask bit 13-30 slot 5 interrupt request status bit 13-29 slot 5 single-shot interrupt request mask bit 13-34 slot 5 single-shot interrupt request status bit 13-33 slot 5 single-shot mode bit 13-53 slot 6 extended format bit 13-21 slot 6 interrupt request mask bit 13-30 slot 6 interrupt request status bit 13-29 slot 6 single-shot interrupt request mask bit 13-34 slot 6 single-shot interrupt request status bit 13-33 slot 6 single-shot mode bit 13-53 slot 7 extended format bit 13-21 slot 7 interrupt request mask bit 13-30 slot 7 interrupt request status bit 13-29 slot 7 single-shot interrupt request mask bit 13-34 slot 7 single-shot interrupt request status bit 13-33 slot 7 single-shot mode bit 13-53 slot 8 extended format bit 13-21 slot 8 interrupt request mask bit 13-30 slot 8 interrupt request status bit 13-29 slot 8 single-shot interrupt request mask bit 13-34 slot 8 single-shot interrupt request status bit 13-33 slot 8 single-shot mode bit 13-53 slot 9 extended format bit 13-21 slot 9 interrupt request mask bit 13-30 slot 9 interrupt request status bit 13-29 slot 9 single-shot interrupt request mask bit 13-34 slot 9 single-shot interrupt request status bit 13-33 slot 9 single-shot mode bit 13-53 slot 10 extended format bit 13-21 slot 10 interrupt request mask bit 13-30 slot 10 interrupt request status bit 13-29 slot 10 single-shot interrupt request mask bit 13-34 slot 10 single-shot interrupt request status bit 13-33 slot 10 single-shot mode bit 13-53 slot 11 extended format bit 13-21 slot 11 interrupt request mask bit 13-30 slot 11 interrupt request status bit 13-29 slot 11 single-shot interrupt request mask bit 13-34 slot 11 single-shot interrupt request status bit 13-33 slot 11 single-shot mode bit 13-53 slot 12 extended format bit 13-21 slot 12 interrupt request mask bit 13-30 slot 12 interrupt request status bit 13-29 slot 12 single-shot interrupt request mask bit 13-34 slot 12 single-shot interrupt request status bit 13-33 slot 12 single-shot mode bit 13-53 slot 13 extended format bit 13-21 slot 13 interrupt request mask bit 13-30 slot 13 interrupt request status bit 13-29 slot 13 single-shot interrupt request mask bit 13-34 slot 13 single-shot interrupt request status bit 13-33 slot 13 single-shot mode bit 13-53 slot 14 extended format bit 13-21 slot 14 interrupt request mask bit 13-30 slot 14 interrupt request status bit 13-29 slot 14 single-shot interrupt request mask bit 13-34 slot 14 single-shot interrupt request status bit 13-33 slot 14 single-shot mode bit 13-53 slot 15 extended format bit 13-21 slot 15 interrupt request mask bit 13-30 slot 15 interrupt request status bit 13-29 slot 15 single-shot interrupt request mask bit 13-34 slot 15 single-shot interrupt request status bit 13-33 slot 15 single-shot mode bit 13-53 smod 12-15 ssb0 13-29 ssb1 13-29 ssb2 13-29 ssb3 13-29 ssb4 13-29 ssb5 13-29 ssb6 13-29 ssb7 13-29 ssb8 13-29 ssb9 13-29 ssb10 13-29 ssb11 13-29 ssb12 13-29 ssb13 13-29 ssb14 13-29 ssb15 13-29 sscnt0 13-53 sscnt1 13-53 sscnt2 13-53 sscnt3 13-53 sscnt4 13-53 sscnt5 13-53 sscnt6 13-53 sscnt7 13-53 sscnt8 13-53 sscnt9 13-53 sscnt10 13-53 sscnt11 13-53 sscnt12 13-53 sscnt13 13-53 sscnt14 13-53 sscnt15 13-53 ssimk0 13-34 ssimk1 13-34 ssimk2 13-34 ssimk3 13-34 ssimk4 13-34
index-26 sfr index 32176 group user?s manual (rev.1.01) ssimk5 13-34 ssimk6 13-34 ssimk7 13-34 ssimk8 13-34 ssimk9 13-34 ssimk10 13-34 ssimk11 13-34 ssimk12 13-34 ssimk13 13-34 ssimk14 13-34 ssimk15 13-34 ssist0 10-33 ssist1 10-33 ssist2 10-33 ssist3 10-33 ssist4 10-33 ssist5 10-33 ssist6 10-33 ssist7 10-33 ssist8 10-33 ssist9 10-33 ssist10 10-33 ssist11 10-33 ssist12 10-33 ssist13 10-33 ssist14 10-33 ssist15 10-33 standard id0 bit 13-58 standard id1 bit 13-58 standard id2 bit 13-58 standard id3 bit 13-58 standard id4 bit 13-58 standard id5 bit 13-59 standard id6 bit 13-59 standard id7 bit 13-59 standard id8 bit 13-59 standard id9 bit 13-59 standard id10 bit 13-59 standard mask id0 bit 13-49 standard mask id1 bit 13-49 standard mask id2 bit 13-49 standard mask id3 bit 13-49 standard mask id4 bit 13-49 standard mask id5 bit 13-49 standard mask id6 bit 13-49 standard mask id7 bit 13-49 standard mask id8 bit 13-49 standard mask id9 bit 13-49 standard mask id10 bit 13-49 stb 12-15 stfe 13-45 stop bit length select bit, uart mode only 12-15 stuff error detection bit 13-45 t t0mask 12-10 t1mask 12-10 t2mask 12-10 t3mask 12-10 tbe 12-13 tclk input processing control register 3-13, 10-8, 10-17 tclk0 input processing select bit 10-17 tclk0s 10-17 tclk1 input processing select bit 10-17 tclk1s 10-17 tclk2 input processing select bit 10-17 tclk2s 10-17 tclk3 input processing select bit 10-17 tclk3s 10-17 tclkcr 3-13, 10-8, 10-17 ten 12-13 tenl0 9-6 tenl1 9-6 tenl2 9-7 tenl3 9-7 tenl4 9-8 tenl5 9-8 tenl6 9-9 tenl7 9-9 tenl8 9-10 tenl9 9-10 timestamp counter reset bit 13-15 timestamp prescaler bit 13-15 tin input processing control register 0 3-13, 10-8, 10-18 tin input processing control register 3 3-13, 10-8, 10-19 tin input processing control register 4 3-13, 10-8, 10-19 tin interrupt control register 0 3-14, 10-8, 10-37 tin interrupt control register 1 3-14, 10-8, 10-38 tin interrupt control register 4 3-14, 10-8, 10-39 tin interrupt control register 5 3-14, 10-8, 10-39 tin interrupt control register 6 3-14, 10-8, 10-41 tin0 input processing select bit 10-18 tin0 interrupt request mask bit 10-37 tin0 interrupt request status bit 10-37 tin0s 10-18 tin16 input processing select bit 10-19 tin16 interrupt request mask bit 10-39 tin16 interrupt request status bit 10-39 tin16s 10-19 tin17 input processing select bit 10-19 tin17 interrupt request mask bit 10-39 tin17 interrupt request status bit 10-39 tin17s 10-19 tin18 input processing select bit 10-19 tin18 interrupt request mask bit 10-39 tin18 interrupt request status bit 10-39 tin18s 10-19 tin19 input processing select bit 10-19
sfr index index-27 32176 group user?s manual (rev.1.01) tin19 interrupt request mask bit 10-39 tin19 interrupt request status bit 10-39 tin19s 10-19 tin20 input processing select bit 10-19 tin20 interrupt request mask bit 10-41 tin20 interrupt request status bit 10-41 tin20s 10-19 tin21 input processing select bit 10-19 tin21 interrupt request mask bit 10-41 tin21 interrupt request status bit 10-41 tin21s 10-19 tin22 input processing select bit 10-19 tin22 interrupt request mask bit 10-41 tin22 interrupt request status bit 10-41 tin22s 10-19 tin23 input processing select bit 10-19 tin23 interrupt request mask bit 10-41 tin23 interrupt request status bit 10-41 tin23s 10-19 tin3 input processing select bit 10-18 tin3 interrupt request mask bit 10-38 tin3 interrupt request status bit 10-38 tin3s 10-18 tincr0 3-13, 10-8, 10-18 tincr3 3-13, 10-8, 10-19 tincr4 3-13, 10-8, 10-19 tinim0 10-37 tinim3 10-38 tinim16 10-39 tinim17 10-39 tinim18 10-39 tinim19 10-39 tinim20 10-41 tinim21 10-41 tinim22 10-41 tinim23 10-41 tinir0 3-14, 10-8, 10-37 tinir1 3-14, 10-8, 10-38 tinir4 3-14, 10-8, 10-39 tinir5 3-14, 10-8, 10-39 tinir6 3-14, 10-8, 10-41 tinis0 10-37 tinis3 10-38 tinis16 10-39 tinis17 10-39 tinis18 10-39 tinis19 10-39 tinis20 10-41 tinis21 10-41 tinis22 10-41 tinis23 10-41 tio interrupt control register 0 3-14, 10-8, 10-33 tio interrupt control register 1 3-14, 10-8, 10-34 tio interrupt control register 2 3-14, 10-8, 10-35 tio0 count enable bit 10-91 tio0 counter 3-16, 10-77, 10-87 tio0 enable protect bit 10-90 tio0 enable/measure input source select bit 10-80 tio0 interrupt request mask bit 10-33 tio0 interrupt request status bit 10-33 tio0 operation mode select bit 10-80 tio0 reload 0/measure register 3-16, 10-77, 10-88 tio0 reload 1 register 3-16, 10-77, 10-89 tio0-3 clock source select bit 10-81 tio0-3 control register 0 3-16, 10-77, 10-80 tio0-3 control register 1 3-16, 10-77, 10-81 tio03cks 10-81 tio03cr0 3-16, 10-77, 10-80 tio03cr1 3-16, 10-77, 10-81 tio0-9 count enable register 3-17, 10-78, 10-91 tio0-9 enable protect register 3-17, 10-78, 10-90 tio0cen 10-91 tio0ct 3-16, 10-77, 10-87 tio0ens 10-80 tio0m 10-80 tio0pro 10-90 tio0rl0 3-16, 10-77, 10-88 tio0rl1 3-16, 10-77, 10-89 tio1 count enable bit 10-91 tio1 counter 3-16, 10-77, 10-87 tio1 enable protect bit 10-90 tio1 interrupt request mask bit 10-33 tio1 interrupt request status bit 10-33 tio1 operation mode select bit 10-80 tio1 reload 0/measure register 3-16, 10-77, 10-88 tio1 reload 1 register 3-16, 10-77, 10-89 tio1cen 10-91 tio1ct 3-16, 10-77, 10-87 tio1m 10-80 tio1pro 10-90 tio1rl0 3-16, 10-77, 10-88 tio1rl1 3-16, 10-77, 10-89 tio2 count enable bit 10-91 tio2 counter 3-16, 10-77, 10-87 tio2 enable protect bit 10-90 tio2 interrupt request mask bit 10-33 tio2 interrupt request status bit 10-33 tio2 operation mode select bit 10-80 tio2 reload 0/measure register 3-16, 10-77, 10-88 tio2 reload 1 register 3-16, 10-77, 10-89 tio2cen 10-91 tio2ct 3-16, 10-77, 10-87 tio2m 10-80 tio2pro 10-90 tio2rl0 3-16, 10-77, 10-88 tio2rl1 3-16, 10-77, 10-89 tio3 count enable bit 10-91 tio3 counter 3-16, 10-77, 10-87
index-28 sfr index 32176 group user?s manual (rev.1.01) tio3 enable protect bit 10-90 tio3 external input enable bit 10-80 tio3 interrupt request mask bit 10-33 tio3 interrupt request status bit 10-33 tio3 operation mode select bit 10-80 tio3 reload 0/measure register 3-16, 10-77, 10-88 tio3 reload 1 register 3-16, 10-77, 10-89 tio3,4 enable/measure input source select bit 10-82 tio34ens 10-82 tio3cen 10-91 tio3ct 3-16, 10-77, 10-87 tio3een 10-80 tio3m 10-80 tio3pro 10-90 tio3rl0 3-16, 10-77, 10-88 tio3rl1 3-16, 10-77, 10-89 tio4 clock source select bit 10-82 tio4 control register 3-17, 10-77, 10-82 tio4 count enable bit 10-91 tio4 counter 3-16, 10-77, 10-87 tio4 enable protect bit 10-90 tio4 external input enable bit 10-82 tio4 interrupt request mask bit 10-34 tio4 interrupt request status bit 10-34 tio4 operation mode select bit 10-82 tio4 reload 0/measure register 3-16, 10-77, 10-88 tio4 reload 1 register 3-16, 10-77, 10-89 tio4cen 10-91 tio4cks 10-82 tio4cr 3-17, 10-77, 10-82 tio4ct 3-16, 10-77, 10-87 tio4een 10-82 tio4m 10-82 tio4pro 10-90 tio4rl0 3-16, 10-77, 10-88 tio4rl1 3-16, 10-77, 10-89 tio5 clock source select bit 10-84 tio5 control register 3-17, 10-77, 10-84 tio5 count enable bit 10-91 tio5 counter 3-17, 10-77, 10-87 tio5 enable protect bit 10-90 tio5 enable/measure input source select bit 10-84 tio5 interrupt request mask bit 10-34 tio5 interrupt request status bit 10-34 tio5 operation mode select bit 10-84 tio5 reload 0/measure register 3-17, 10-78, 10-88 tio5 reload 1 register 3-17, 10-78, 10-89 tio5cen 10-91 tio5cks 10-84 tio5cr 3-17, 10-77, 10-84 tio5ct 3-17, 10-77, 10-87 tio5ens 10-84 tio5m 10-84 tio5pro 10-90 tio5rl0 3-17, 10-78, 10-88 tio5rl1 3-17, 10-78, 10-89 tio6 clock source select bit 10-85 tio6 control register 3-17, 10-78, 10-85 tio6 count enable bit 10-91 tio6 counter 3-17, 10-78, 10-87 tio6 enable protect bit 10-90 tio6 enable/measure input source select bit 10-85 tio6 interrupt request mask bit 10-34 tio6 interrupt request status bit 10-34 tio6 operation mode select bit 10-85 tio6 reload 0/measure register 3-17, 10-78, 10-88 tio6 reload 1 register 3-17, 10-78, 10-89 tio6cen 10-91 tio6cks 10-85 tio6cr 3-17, 10-78, 10-85 tio6ct 3-17, 10-78, 10-87 tio6ens 10-85 tio6m 10-85 tio6pro 10-90 tio6rl0 3-17, 10-78, 10-88 tio6rl1 3-17, 10-78, 10-89 tio7 clock source select bit 10-86 tio7 control register 3-17, 10-78, 10-86 tio7 count enable bit 10-91 tio7 counter 3-17, 10-78, 10-87 tio7 enable protect bit 10-90 tio7 enable/measure input source select bit 10-86 tio7 interrupt request mask bit 10-34 tio7 interrupt request status bit 10-34 tio7 operation mode select bit 10-86 tio7 reload 0/measure register 3-17, 10-78, 10-88 tio7 reload 1 register 3-17, 10-78, 10-89 tio7cen 10-91 tio7cks 10-86 tio7cr 3-17, 10-78, 10-86 tio7ct 3-17, 10-78, 10-87 tio7ens 10-86 tio7m 10-86 tio7pro 10-90 tio7rl0 3-17, 10-78, 10-88 tio7rl1 3-17, 10-78, 10-89 tio8 clock source select bit 10-86 tio8 control register 3-17, 10-78, 10-86 tio8 count enable bit 10-91 tio8 counter 3-17, 10-78, 10-87 tio8 enable protect bit 10-90 tio8 enable/measure input source select bit 10-86 tio8 interrupt request mask bit 10-35 tio8 interrupt request status bit 10-35 tio8 operation mode select bit 10-86 tio8 reload 0/measure register 3-17, 10-78, 10-88 tio8 reload 1 register 3-17, 10-78, 10-89 tio8cen 10-91
sfr index index-29 32176 group user?s manual (rev.1.01) tio8cks 10-86 tio8cr 3-17, 10-78, 10-86 tio8ct 3-17, 10-78, 10-87 tio8ens 10-86 tio8m 10-86 tio8pro 10-90 tio8rl0 3-17, 10-78, 10-88 tio8rl1 3-17, 10-78, 10-89 tio9 clock source select bit 10-87 tio9 control register 3-17, 10-78, 10-87 tio9 count enable bit 10-91 tio9 counter 3-17, 10-78, 10-87 tio9 enable protect bit 10-90 tio9 enable/measure input source select bit 10-87 tio9 interrupt request mask bit 10-35 tio9 interrupt request status bit 10-35 tio9 operation mode select bit 10-87 tio9 reload 0/measure register 3-17, 10-78, 10-88 tio9 reload 1 register 3-17, 10-78, 10-89 tio9cen 10-91 tio9cks 10-87 tio9cr 3-17, 10-78, 10-87 tio9ct 3-17, 10-78, 10-87 tio9ens 10-87 tio9m 10-87 tio9pro 10-90 tio9rl0 3-17, 10-78, 10-88 tio9rl1 3-17, 10-78, 10-89 tiocen 3-17, 10-78, 10-91 tioim0 10-33 tioim1 10-33 tioim2 10-33 tioim3 10-33 tioim4 10-34 tioim5 10-34 tioim6 10-34 tioim7 10-34 tioim8 10-35 tioim9 10-35 tioir0 3-14, 10-8, 10-33 tioir1 3-14, 10-8, 10-34 tioir2 3-14, 10-8, 10-35 tiois0 10-33 tiois1 10-33 tiois2 10-33 tiois3 10-33 tiois4 10-34 tiois5 10-34 tiois6 10-34 tiois7 10-34 tiois8 10-35 tiois9 10-35 tiopro 3-17, 10-78, 10-90 tml0 clock source select bit 10-112 tml0 control register 3-18, 10-111, 10-112 tml0 counter (lower) 3-18, 10-111, 10-113 tml0 counter (upper) 3-18, 10-111, 10-113 tml0 measure 0 register 3-18, 10-111, 10-114 tml0 measure 0 source select bit 10-112 tml0 measure 1 register 3-18, 10-111, 10-114 tml0 measure 1 source select bit 10-112 tml0 measure 2 register 3-18, 10-111, 10-114 tml0 measure 2 source select bit 10-112 tml0 measure 3 register 3-18, 10-111, 10-114 tml0 measure 3 source select bit 10-112 tml0cks 10-112 tml0cr 3-18, 10-111, 10-112 tml0cth 3-18, 10-111, 10-113 tml0ctl 3-18, 10-111, 10-113 tml0mr0h 3-18, 10-111, 10-114 tml0mr0l 3-18, 10-111, 10-114 tml0mr1h 3-18, 10-111, 10-114 tml0mr1l 3-18, 10-111, 10-114 tml0mr2h 3-18, 10-111, 10-114 tml0mr2l 3-18, 10-111, 10-114 tml0mr3h 3-18, 10-111, 10-114 tml0mr3l 3-18, 10-111, 10-114 tml0ss0 10-112 tml0ss1 10-112 tml0ss2 10-112 tml0ss3 10-112 tml1 clock source select bit 10-112 tml1 control register 3-22, 10-111, 10-112 tml1 counter (lower) 3-22, 10-111, 10-113 tml1 counter (upper) 3-21, 10-111, 10-113 tml1 measure 0 register 3-22, 10-111, 10-115 tml1 measure 0 source select bit 10-112 tml1 measure 1 register 3-22, 10-111, 10-115 tml1 measure 1 source select bit 10-112 tml1 measure 2 register 3-22, 10-111, 10-115 tml1 measure 2 source select bit 10-112 tml1 measure 3 register 3-22, 10-111, 10-115 tml1 measure 3 source select bit 10-112 tml1cks 10-112 tml1cr 3-22, 10-111, 10-112 tml1cth 3-21, 10-111, 10-113 tml1ctl 3-22, 10-111, 10-113 tml1mr0h 3-22, 10-111, 10-115 tml1mr0l 3-22, 10-111, 10-115 tml1mr1h 3-22, 10-111, 10-115 tml1mr1l 3-22, 10-111, 10-115 tml1mr2h 3-22, 10-111, 10-115 tml1mr2l 3-22, 10-111, 10-115 tml1mr3h 3-22, 10-111, 10-115 tml1mr3l 3-22, 10-111, 10-115 tml1ss0 10-112 tml1ss1 10-112 tml1ss2 10-112
index-30 sfr index 32176 group user?s manual (rev.1.01) tml1ss3 10-112 tms interrupt control register 3-14, 10-8, 10-36 tms0 clock source select bit 10-107 tms0 control register 3-18, 10-106, 10-107 tms0 count enable bit 10-107 tms0 counter 3-17, 10-106, 10-108 tms0 interrupt request mask bit 10-36 tms0 interrupt request status bit 10-36 tms0 measure 0 register 3-18, 10-106, 10-108 tms0 measure 0 source select bit 10-107 tms0 measure 1 register 3-18, 10-106, 10-108 tms0 measure 1 source select bit 10-107 tms0 measure 2 register 3-18, 10-106, 10-108 tms0 measure 2 source select bit 10-107 tms0 measure 3 register 3-17, 10-106, 10-108 tms0 measure 3 source select bit 10-107 tms0cen 10-107 tms0cks 10-107 tms0cr 3-18, 10-106, 10-107 tms0ct 3-17, 10-106, 10-108 tms0mr0 3-18, 10-106, 10-108 tms0mr1 3-18, 10-106, 10-108 tms0mr2 3-18, 10-106, 10-108 tms0mr3 3-17, 10-106, 10-108 tms0ss0 10-107 tms0ss1 10-107 tms0ss2 10-107 tms0ss3 10-107 tms1 clock source select bit 10-107 tms1 control register 3-18, 10-106, 10-107 tms1 count enable bit 10-107 tms1 counter 3-18, 10-106, 10-108 tms1 interrupt request mask bit 10-36 tms1 interrupt request status bit 10-36 tms1 measure 0 register 3-18, 10-106, 10-108 tms1 measure 0 source select bit 10-107 tms1 measure 1 register 3-18, 10-106, 10-108 tms1 measure 1 source select bit 10-107 tms1 measure 2 register 3-18, 10-106, 10-108 tms1 measure 2 source select bit 10-107 tms1 measure 3 register 3-18, 10-106, 10-108 tms1 measure 3 source select bit 10-107 tms1cen 10-107 tms1cks 10-107 tms1cr 3-18, 10-106, 10-107 tms1ct 3-18, 10-106, 10-108 tms1mr0 3-18, 10-106, 10-108 tms1mr1 3-18, 10-106, 10-108 tms1mr2 3-18, 10-106, 10-108 tms1mr3 3-18, 10-106, 10-108 tms1ss0 10-107 tms1ss1 10-107 tms1ss2 10-107 tms1ss3 10-107 tmsim0 10-36 tmsim1 10-36 tmsir 3-14, 10-8, 10-36 tmsis0 10-36 tmsis1 10-36 top interrupt control register 0 3-14, 10-8, 10-29 top interrupt control register 1 3-14, 10-8, 10-29 top interrupt control register 2 3-14, 10-8, 10-31 top interrupt control register 3 3-14, 10-8, 10-32 top0 correction register 3-14, 10-46, 10-55 top0 count enable bit 10-57 top0 counter 3-14, 10-46, 10-53 top0 enable protect bit 10-56 top0 external enable permit bit 10-56 top0 interrupt request mask bit 10-29 top0 interrupt request status bit 10-29 top0 operation mode select bit 10-49 top0 reload register 3-14, 10-46, 10-54 top0-10 count enable register 3-16, 10-47, 10-57 top0-10 enable protect register 3-16, 10-47, 10-56 top0-10 external enable permit register 3-16, 10-47, 10-56 top0?5 clock source select bit 10-49 top0?5 control register 0 3-15, 10-47, 10-49 top0?5 control register 1 3-15, 10-47, 10-49 top0?5 enable source select bit 10-49 top05cks 10-49 top05cr0 3-15, 10-47, 10-49 top05cr1 3-15, 10-47, 10-49 top05ens 10-49 top0cc 3-14, 10-46, 10-55 top0cen 10-57 top0ct 3-14, 10-46, 10-53 top0een 10-56 top0m 10-49 top0pro 10-56 top0rl 3-14, 10-46, 10-54 top1 correction register 3-14, 10-46, 10-55 top1 count enable bit 10-57 top1 counter 3-14, 10-46, 10-53 top1 enable protect bit 10-56 top1 external enable permit bit 10-56 top1 interrupt request mask bit 10-29 top1 interrupt request status bit 10-29 top1 operation mode select bit 10-49 top1 reload register 3-14, 10-46, 10-54 top1cc 3-14, 10-46, 10-55 top1cen 10-57 top1ct 3-14, 10-46, 10-53 top1een 10-56 top1m 10-49 top1pro 10-56 top1rl 3-14, 10-46, 10-54 top2 correction register 3-14, 10-46, 10-55 top2 count enable bit 10-57
sfr index index-31 32176 group user?s manual (rev.1.01) top2 counter 3-14, 10-46, 10-53 top2 enable protect bit 10-56 top2 external enable permit bit 10-56 top2 interrupt request mask bit 10-29 top2 interrupt request status bit 10-29 top2 operation mode select bit 10-49 top2 reload register 3-14, 10-46, 10-54 top2cc 3-14, 10-46, 10-55 top2cen 10-57 top2ct 3-14, 10-46, 10-53 top2een 10-56 top2m 10-49 top2pro 10-56 top2rl 3-14, 10-46, 10-54 top3 correction register 3-14, 10-46, 10-55 top3 count enable bit 10-57 top3 counter 3-14, 10-46, 10-53 top3 enable protect bit 10-56 top3 external enable permit bit 10-56 top3 interrupt request mask bit 10-29 top3 interrupt request status bit 10-29 top3 operation mode select bit 10-49 top3 reload register 3-14, 10-46, 10-54 top3cc 3-14, 10-46, 10-55 top3cen 10-57 top3ct 3-14, 10-46, 10-53 top3een 10-56 top3m 10-49 top3pro 10-56 top3rl 3-14, 10-46, 10-54 top4 correction register 3-15, 10-46, 10-55 top4 count enable bit 10-57 top4 counter 3-14, 10-46, 10-53 top4 enable protect bit 10-56 top4 external enable permit bit 10-56 top4 interrupt request mask bit 10-29 top4 interrupt request status bit 10-29 top4 operation mode select bit 10-49 top4 reload register 3-14, 10-46, 10-54 top4cc 3-15, 10-46, 10-55 top4cen 10-57 top4ct 3-14, 10-46, 10-53 top4een 10-56 top4m 10-49 top4pro 10-56 top4rl 3-14, 10-46, 10-54 top5 correction register 3-15, 10-46, 10-55 top5 count enable bit 10-57 top5 counter 3-15, 10-46, 10-53 top5 enable protect bit 10-56 top5 external enable permit bit 10-56 top5 interrupt request mask bit 10-29 top5 interrupt request status bit 10-29 top5 operation mode select bit 10-49 top5 reload register 3-15, 10-46, 10-54 top5cc 3-15, 10-46, 10-55 top5cen 10-57 top5ct 3-15, 10-46, 10-53 top5een 10-56 top5m 10-49 top5pro 10-56 top5rl 3-15, 10-46, 10-54 top6 correction register 3-15, 10-47, 10-55 top6 count enable bit 10-57 top6 counter 3-15, 10-47, 10-53 top6 enable protect bit 10-56 top6 external enable permit bit 10-56 top6 interrupt request mask bit 10-31 top6 interrupt request status bit 10-31 top6 operation mode select bit 10-51 top6 reload register 3-15, 10-47, 10-54 top6, 7 control register 3-15, 10-47, 10-51 top6, top7 clock source select bit 10-51 top6, top7 enable source select bit 10-51 top67cks 10-51 top67cr 3-15, 10-47, 10-51 top67ens 10-51 top6cc 3-15, 10-47, 10-55 top6cen 10-57 top6ct 3-15, 10-47, 10-53 top6een 10-56 top6m 10-51 top6pro 10-56 top6rl 3-15, 10-47, 10-54 top7 correction register 3-15, 10-47, 10-55 top7 count enable bit 10-57 top7 counter 3-15, 10-47, 10-53 top7 enable protect bit 10-56 top7 enable source select bit 10-51 top7 external enable permit bit 10-56 top7 interrupt request mask bit 10-31 top7 interrupt request status bit 10-31 top7 operation mode select bit 10-51 top7 reload register 3-15, 10-47, 10-54 top7cc 3-15, 10-47, 10-55 top7cen 10-57 top7ct 3-15, 10-47, 10-53 top7een 10-56 top7ens 10-51 top7m 10-51 top7pro 10-56 top7rl 3-15, 10-47, 10-54 top8 correction register 3-15, 10-47, 10-55 top8 count enable bit 10-57 top8 counter 3-15, 10-47, 10-53 top8 enable protect bit 10-56 top8 external enable permit bit 10-56 top8 interrupt request mask bit 10-32
index-32 sfr index 32176 group user?s manual (rev.1.01) top8 interrupt request status bit 10-32 top8 operation mode select bit 10-52 top8 reload register 3-15, 10-47, 10-54 top8?10 clock source select bit 10-52 top8?10 control register 3-16, 10-47, 10-52 top8?10 enable source select bit 10-52 top810cks 10-52 top810cr 3-16, 10-47, 10-52 top810ens 10-52 top8cc 3-15, 10-47, 10-55 top8cen 10-57 top8ct 3-15, 10-47, 10-53 top8een 10-56 top8m 10-52 top8pro 10-56 top8rl 3-15, 10-47, 10-54 top9 correction register 3-15, 10-47, 10-55 top9 count enable bit 10-57 top9 counter 3-15, 10-47, 10-53 top9 enable protect bit 10-56 top9 external enable permit bit 10-56 top9 interrupt request mask bit 10-32 top9 interrupt request status bit 10-32 top9 operation mode select bit 10-52 top9 reload register 3-15, 10-47, 10-54 top9cc 3-15, 10-47, 10-55 top9cen 10-57 top9ct 3-15, 10-47, 10-53 top9een 10-56 top9m 10-52 top9pro 10-56 top9rl 3-15, 10-47, 10-54 top10 correction register 3-16, 10-47, 10-55 top10 count enable bit 10-57 top10 counter 3-15, 10-47, 10-53 top10 enable protect bit 10-56 top10 external enable permit bit 10-56 top10 operation mode select bit 10-52 top10 reload register 3-15, 10-47, 10-54 top10cc 3-16, 10-47, 10-55 top10cen 10-57 top10ct 3-15, 10-47, 10-53 top10een 10-56 top10m 10-52 top10pro 10-56 top10rl 3-15, 10-47, 10-54 topcen 3-16, 10-47, 10-57 topeen 3-16, 10-47, 10-56 topim0 10-29 topim1 10-29 topim2 10-29 topim3 10-29 topim4 10-29 topim5 10-29 topim6 10-31 topim7 10-31 topim8 10-32 topim9 10-32 topir0 3-14, 10-8, 10-29 topir1 3-14, 10-8, 10-29 topir2 3-14, 10-8, 10-31 topir3 3-14, 10-8, 10-32 topis0 10-29 topis1 10-29 topis2 10-29 topis3 10-29 topis4 10-29 topis5 10-29 topis6 10-31 topis7 10-31 topis8 10-32 topis9 10-32 toppro 3-16, 10-47, 10-56 tr 13-55 transmission completed status bit 13-18 transmission/reception finished bit 13-55 transmit buffer empty bit 12-13 transmit enable bit 12-13 transmit error detection bit 13-45 transmit request bit 13-55 transmit status bit 12-13, 13-18 transmit/receive clock polarity select bit 12-24 transmit/receive status bit 13-55 tre 13-45 treqf0 9-6 treqf1 9-6 treqf2 9-7 treqf3 9-7 treqf4 9-8 treqf5 9-8 treqf6 9-9 treqf7 9-9 treqf8 9-10 treqf9 9-10 trfin 13-55 trstat 13-55 tsb 13-18 tsc 13-18 tsp 13-15 tsr 13-15 tstat 12-13 tszsl0 9-6 tszsl1 9-6 tszsl2 9-7 tszsl3 9-7 tszsl4 9-8 tszsl5 9-8 tszsl6 9-9
sfr index index-33 32176 group user?s manual (rev.1.01) tszsl7 9-9 tszsl8 9-10 tszsl9 9-10 v virtual flash emulation l enable bit 6-15 virtual flash emulation mode bit 6-9 virtual flash emulation s enable bit 6-16 virtual flash l bank register 0 3-21, 6-6, 6-15 virtual flash l bank register 1 3-21, 6-6, 6-15 virtual flash s bank register 0 3-21, 6-6, 6-16 virtual flash s bank register 1 3-21, 6-6, 6-16 vtnsel 8-19 w wait cycles control register 3-13, 16-4 wfnsel 8-19 wrerr 6-8 write status confirmation bit 6-8 write to ram by rtd disable bit 14-3 wrrdis 3-21, 14-3 wtccr 3-13, 16-4 x xdrv 18-5 xdrv write control bit 18-5 xdrvp 18-5 xin oscillation status bit 8-15, 18-3 xin-xout drive capability select bit 18-5 xstat 8-15, 18-3
index-34 sfr index 32176 group user?s manual (rev.1.01) this page is blank for reasons of layout.
renesas 32-bit risc single-chip microcomputer user?s manual 32176 group publication data : rev.1.01 oct 31, 2003 published by : sales strategic planning div. renesas technology corp. ? 2003. renesas technology corp., all rights reserved. printed in japan.
32176 group user?s manual 2-6-2, ote-machi, chiyoda-ku, tokyo, 100-0004, japan


▲Up To Search▲   

 
Price & Availability of M32176F2VFP

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X